loewydesign / loewy-assets Goto Github PK
View Code? Open in Web Editor NEWA front-end asset pipeline driven by gulp.js.
License: MIT License
A front-end asset pipeline driven by gulp.js.
License: MIT License
Update the default config to get rid of IE8, IE9, and Opera.
Please implement the gulp-plumber
monkey-patch for the js
and styles
tasks. Basically, you need to pipe through plumber()
before any other tool. This prevents broken pipes from stalling the entire stream. (e.g. if something goes wrong with the Sass pipe, it won't hang the whole watch process, it'll just keep going)
All loewy-assets
dependencies need to be updated to their latest versions.
When using gulp
or gulp watch
with the default sass
task, sometimes, errors like this appear:
[gulp] Finished 'css' after 11 ms
[gulp] Starting 'sass'...
Error in plugin 'sass'
Message:
wp-content\themes\example\assets\dev\scss\main.scss
11:9 file to import not found or unreadable: components/widgets/events
Current dir:
[gulp] Finished 'sass' after 66 ms
The files in question do exist, and are readable. This seems to be some sort of intermittent issue.
Right now, deploy-js
both minifies and fingerprints the JS files. Let's separate this into two separate tasks (minify-js
and fingerprint-js
). For backwards compatibility, we can keep the deploy-js
tasks, but it should just run the two new tasks. Please do the same thing for the deploy-css
task as well.
gulp.task('js', ['clean-js'], function(done) {
for (var i = 0; i < taskFuncs.length; ++i)
{
var taskFunc = taskFuncs[i];
taskFunc();
}
});
The done
callback is never called. Even through the task will usually complete successfully, Gulp will not know about its completion.
In gulpfile.js
, this works:
var assetsDir = 'assets/dev/',
publicDir = 'assets/release/';
This doesn't:
var assetsDir = 'assets/dev',
publicDir = 'assets/release';
Need to check for a trailing slash, and if it's not there, add it automatically.
Looks like there are conflicts between the SCSS and CSS watches when multiple CSS files are generated by the SCSS compilation. The CSS watch ends up executing the css
task multiple times (once per output CSS file), and that causes read/write issues.
To fix this, we should simplify the sass.js
and css.js
tasks into a single styles.js
task which does the following:
sass.js
.)sass.js
.)sass.js
.)autoprefixer
. (Currently in css.js
.)css.js
.)Let's implement the Babel transpiler for the JS task. Should a simple one-line addition in tasks/js.js
(before the concat
call). Extract the Babel options in config.js.babel
, and provide sensible defaults (like { presets: ['es2015'] }
).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.