Has anyone rolled gulp into apostrophe for compiling assets? I'd like to use ES6, as I'm using a frontend framework that has all of the js nicely split up into separate assets, and have the compilation of that into one minified file part of the normal apostrophe build process (I'm using apostrophe-assets to reference a single root js file which imports everything else).
相关问题
- How to test my jQuery plugin with Gulp, Jasmine an
- Gulp BrowserSync showing “reloading browsers” in T
- gulp-iconfont task not populating unicode value
- Start a shell process in Gulp with callback when p
- Gulp is not overwriting the destination file
相关文章
- how can I use babel polyfill to support all IE11 i
- How can I get gulp-typescript to output to the sam
- How to make Gulp.src fail if a file is missing?
- ES6 import module with Gulp
- Gulp: How to set dest folder relative to processed
- Send arguments to gulp task
- uglified files are not rewritten in html file usin
- How to zip multiple folders generating multiple .z
Great question. You're going to want to build your JavaScript with Gulp into one file before pushing that file to the browser using Apostrophe's asset pipeline.
For example you might have a
/src
directory at the root of your project that has your JavaScript files. You can pipe these files into yourapostrophe-assets
directory or some other named directory that is a subclass ofapostrophe-module
in/lib/modules/
.You can then push your compiled file to the browser as usual: http://apostrophecms.org/docs/tutorials/getting-started/pushing-assets.html#configuring-java-script-for-the-browser