Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cross-platform portable #878

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"eslint-plugin-babel": "^4.0.1",
"eslint-plugin-google-camelcase": "0.0.2",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"first-mate": "7.3.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this dependency needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's explained in the commit message. I'll paste its contents below for the sake of convenience.

The highlights package depends on a version range of the first-mate package, which currently resolves to v7.4.0. This version of first-mate depends on oniguruma v7.2.0. This version of oniguruma is broken. I am locking first-mate at v7.3.0, which uses the previous functioning version of oniguruma (v7.1.0) in order for npm i to complete.

"fs-extra": "^2.0.0",
"gulp": "^3.9.1",
"gulp-amphtml-validator": "1.0.2",
Expand Down
5 changes: 3 additions & 2 deletions tasks/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ function collectResources(filepath, html, templateName, done) {
imgs.push.apply(imgs, srcsetimgs);
imgs.forEach(function(imgpath) {
if (imgpath) {
let imgFile = imgpath.split('img/')[1];
let imgFile = imgpath.split('img' + path.sep)[1];
const dest = `.archive/${templateName}/img/${imgFile}`;
fs.copySync(imgpath, dest);
}
});
let pathToTmpl = filepath.replace(/.*templates\/(.*)/, '\$1');
const pathToTmplRegex = new RegExp('.*templates\\' + path.sep + '(.*)');
This conversation was marked as resolved.
Show resolved Hide resolved
let pathToTmpl = filepath.replace(pathToTmplRegex, '\$1');
pathToTmpl = pathToTmpl.replace(templateName + '/', 'templates/');
fs.copySync(filepath,
`.archive/${templateName}/${pathToTmpl}`);
Expand Down