romanschejbal / gassetic Goto Github PK
View Code? Open in Web Editor NEWAssetic replacement based on the gulp build tool
License: MIT License
Assetic replacement based on the gulp build tool
License: MIT License
Hi!
Thanks for sharing this awesome tool!
I used to use gassetic with dynamique html pages, so I can have code like this one:
{% if platform == 'dev' %}
<!-- dev:styles.css --><!-- endbuild -->
{% else %}
<!-- prod:styles.css --><!-- endbuild -->
{% endif %}
It works perfectly!
What if I should use gassetic with static file, how can I do that?
Is there a way to have a platform agnostic tag?
<!-- *:styles.css --><!-- endbuild -->
Cheers,
Thomas.
Hi,
Sorry to bother you again ;)
I wonder why the given filename is not a filename but a repository name.
I understand the comportement when the files are not concat, but when they are, it is a little weird to have a filename like /js/global.js/global_a9c64ad2aa6e0e0e98b188a5a478640a.js
Thank you
To enable running tasks in parallel, see https://www.npmjs.org/package/run-sequence
I'm trying to use gulp-sourcemaps
with gulp-sass
and it seems to work well in any non-dev environments. Is this a feature or a bug?
For instance the following gassetic.yml:
requires:
sass: gulp-sass
plumber: gulp-plumber
sourcemaps: gulp-sourcemaps
mimetypes:
sass:
dev:
outputFolder: test/dev
webPath: /dev
tasks:
- { name: plumber }
- { name: sourcemaps.init }
- { name: sass }
- { name: sourcemaps.write }
arbitrary:
outputFolder: test/arbitrary
webPath: /arbitrary
tasks:
- { name: plumber }
- { name: sourcemaps.init }
- { name: sass }
- { name: sourcemaps.write }
files:
sass.css:
- app/Resources/styles/fonts.scss
- app/Resources/styles/vendor.scss
default: [sass]
Notice that dev and arbitrary are identical but yield different results:
→ gassetic build --env=arbitrary
[11:58:54] Processing: sass with plumber(), sourcemaps.init(), sass(), sourcemaps.write()
[11:58:54] - sass.css
[11:58:54] Tested 3 tests, 3 passes, 0 failures: PASS
→ gassetic build --env=dev
[11:58:48] Processing: sass with plumber(), sourcemaps.init(), sass(), sourcemaps.write()
[11:58:48] - sass.css
[11:58:48] Plumber found unhandled error:
Error in plugin 'gulp-sass'
Message:
Error: File to read not found or unreadable: [redacted]/app/Resources/styles/fonts_0.scss
[11:58:48] Tested 3 tests, 3 passes, 0 failures: PASS
[11:58:48] Plumber found unhandled error:
Error in plugin 'gulp-sass'
Message:
Error: File to read not found or unreadable: [redacted]/app/Resources/styles/vendor_1.scss
Current syntax like <!-- prod:frontend.css --><!-- endbuild -->
looks ugly. Also it requires search and process all of the html files to replace placeholders with actual files. I propose add alternatie implementation:
{% if app.environment == 'prod' %}
<!-- prod:bootstrap.css --><!-- endbuild -->
<!-- prod:frontend.css --><!-- endbuild -->
{% else %}
<!-- dev:bootstrap.css --><!-- endbuild -->
<!-- dev:frontend.css --><!-- endbuild -->
{% endif %}
write just
{% for asset in gassetic_files(['bootstrap.css', 'frontend.css']) %}
<link rel="stylesheet" href="{{ asset }}" />
{% endfor %}
we can also add async here or alternative media or something else. It is much flexible than now. Or we can add of ctrl+click to the config file from here.
var/cache/gassetic.json
or maybe configurable mimetypes.css.dev.metadataFile, mimetypes.js.prod.metadataFile ) with content like{
"bootstrap.css": {
"dev": [
"file1.css",
"file2.css"
],
"prod": [
"minified_combined_file_abcdef123_with_md5_of_content.css"
]
}
}
So after this change watch doesn't require scan all html files and replace each of them. it is enough just update file with metadata.
@romanschejbal can you make changes in gassetic for generating this metadata file please? I don't know coffescript. After your changes I can create twig extension and Symfony bridge for it integration.
I have following
css:
prod:
outputFolder: web/css
webPath: /css
tasks:
- { name: less }
- { name: minify }
- { name: concat, args: '%filename%' }
- { name: freeze }
htmlTag: '<script type="text/javascript" src="{{ asset("%path%") }}"></script>'
dev:
outputFolder: web/css/dev
webPath: /css/dev
tasks: []
files:
main.css:
- lib/bower_components/bootstrap/dist/css/bootstrap.css
- theme/css/skin/light-blue/*.less
For every file theme/css/skin/light-blue/*.less I get output . If i rename files from .less to .css less code is not compiled to css - ouput files contains raw less code. Am i missing something?
Hi @crossborne!
I try to create a copy task (or symlink) to use fontawesome, but I failed on gassetic.yml configuration.
I would like copy/symlink some files in the same specific directory.
Sample :
I would like all my fonts are copied in web/vendor/compiled/fonts
web/vendor/font-awesome/fonts/FontAwesome.otf => web/vendor/compiled/fonts/FontAwesome.otf
web/vendor/font-awesome/fonts/fontawesome-webfont.eot => web/vendor/compiled/fonts/fontawesome-webfont.eot
web/vendor/font-awesome/fonts/fontawesome-webfont.svg => web/vendor/compiled/fonts/fontawesome-webfont.svg
It's possible with the current last gassetic version ? How ?
I have already install gulp-copy and gulp-sym.
Thank you for your help :)
Hi, I would like to call a method of a requirement like this gulp-sourcemaps example
I tried to hook into the buildFile
method adding a else if t.method
but I got some weird errors.
Can you help me with this ?
Thank you
it seems this is not needed when using semantic-ui right?
I am trying to create a gulpfile that just merges my assets from semantic-ui and my project assets but i am not using bundles on symfony all assets are managed via gulp
Currently the htmlTag supports a %path% variable expansion to allow the full path of a processed asset (i.e. /assets/compiled/logo.gif) to be placed within the output that gassetic renders. It would also be nice to add a %filename% expansion that allows us to inject only the "original" base filename of the processed asset (i.e. logo.gif) into the output. In this case we would want the original filename (logo.gif) and not the post-processed filename (logo_0.gif) so that we could reference the original filename as needed.
Use case:
htmlTag: '
gassetic should render this as ...
In this way we get full image revving with a reference to the original filename.
Hi! Is it possible to write a task with gulp-newer or gulp-change? How should it looks like?
files:
style.css:
- html/src/styles/main.less
why gassetic is creating %outputfilder%/style.css/style.css
, and not just plain %outputfolder%/style.css
?
I have been using gassetic in several Symfony2 projects using Linux/Ubuntu without problems. However I tried the same gassetic configuration using MAC OSX and something went wrong. The script never replaces the comments in the twig template but I didn't get an error message. I would be very pleased to know what is going wrong and if there is someone using Mac OSX with gassetic.
Thanks
There seems to be an issue with splitting assets. I have included two example scenarios below:
Sample gassetic.yml
requires:
sass: gulp-ruby-sass
mimetypes:
css:
dev:
outputFolder: web/tmp/css
webPath: /tmp/css
tasks:
- { name: sass, args: { style: 'expanded' } }
prod:
outputFolder: web/compiled/css
webPath: /compiled/css
tasks:
- { name: sass, args: { style: 'compressed' } }
files:
main.css:
- assets/scss/file1.scss
global.css:
- assets/scss/file2.scss
replacementsPaths:
- app/**/*.html.twig
- src/**/*.html.twig
default:
- css
Scenario 1
Including css for file name main.css
{% if app.environment == 'prod' %}
<!-- prod:main.css --><!-- endbuild -->
{% else %}
<!-- dev:main.css --><!-- endbuild -->
{% endif %}
Even though I only included main.css, it also includes the css from global.css file name and it becomes:
<!-- dev:main.css -->
<link rel="stylesheet" href="/tmp/css/main.css/file1_0.css">
<link rel="stylesheet" href="/tmp/css/main.css/file2_0.css">
<!-- endbuild -->
Scenario 2
Including css for both main.css and global.css file names
{% if app.environment == 'prod' %}
<!-- prod:main.css --><!-- endbuild -->
<!-- prod:global.css --><!-- endbuild -->
{% else %}
<!-- dev:main.css --><!-- endbuild -->
<!-- dev:global.css --><!-- endbuild -->
{% endif %}
Each filename includes css from both files
<!-- dev:main.css -->
<link rel="stylesheet" href="/tmp/css/main.css/file1_0.css">
<link rel="stylesheet" href="/tmp/css/main.css/file2_0.css">
<!-- endbuild -->
<!-- dev:global.css -->
<link rel="stylesheet" href="/tmp/css/global.css/file1_0.css">
<link rel="stylesheet" href="/tmp/css/global.css/file2_0.css">
<!-- endbuild -->
If a library contains images (for example a lightbox plugin with a close icon), how can we manage the movement and updating of the images?
I think gassetic is great. But is there an option or a task to copy images, fonts etc over in dev environment so they can exclude the underscore and number like in prod environment? For example: so instead of image_1.png, it would be just image.png. I am wondering how and the best way to link to them while watching them in dev environment.
Hi,
after updating to v1.0.7 the root-outputFoder gets deleted on every build.
With the old version only the files/subfolders defined as output were deleted.
Is this by design?
Thanks!
Assume that this is my yml
config:
[...]
prod:
outputFolder: dist
webPath: /dist
tasks: []
files:
javascripts.js:
- vendor/js/js1.js
- vendor/js/js2.js
[...]
The generated HTML will contain the following:
<!-- prod:dev -->
<script src="/dist/javascripts.js/js1.js"></script>
<script src="/dist/javascripts.js/js2.js"></script>
<!-- endbuild -->
Since I am not running any tasks, the script src
should be /dist/
+ js1.js
and js2.js
. If I were running a concat, then the script src
should become /dist/javascripts.js
.
Basically, it makes no sense to include the filename from YML into the full path.
I would like to use gulp-cdnizer on my project. This plugin acts on a similar level to gassetic - replacing parts of the html
. In order to use this alongside gassetic I currently have to run a seperate gulp script after each gassetic build
to do this. It would be great if there was a way to trigger this from gassetic. Is this possible?
How will I be able to use gassetic with compass?
By importing compass specific files I get
Error: error frontend_10.scss (Line 3: File to import not found or unreadable: compass/reset.
Below my config.
#gassetic.yml
requires:
sass: gulp-ruby-sass
mimetypes:
# This section contains the formatters for the css files
css:
dev:
outputFolder: web/css/compiled # The output folder for your saving your compiled files
webPath: /css/compiled # The web path for the compiled files
# Run these tasks on your compiled files
tasks:
- { name: sass }
htmlTag: '<link rel="stylesheet" type="text/css" href="{{ asset("%path%") }}">' # custom html tag
# This is the list of source files to apply the above settings
files:
frontend: # This is the output filename
- src/Acme/FrontendBundle/Resources/public/css/*.scss
# This is the list of files/paths to search and find the replacement tags to insert the
# generated <script> or stylesheet tags
replacementPaths:
- src/Acme/FrontendBundle/Resources/views/layout.html.twig
default:
- css
# src/Acme/FrontendBundle/Resources/public/css/frontend.scss
@import "compass/reset"; # this causes build to fail
@import "grid-settings";
...
I also tried gulp-compass as lib but with no luck in getting gassetic running.
Could you please give me a hint or provide an example or update doc?
The only thing that should be in the gulpfile are the loaders for the modules
<!-- prod:frontend.css --><!--endbuild-->
does not work
<!-- prod:frontend.css -->
<!--endbuild-->
works
You have to insert a \n in order to make this work.
I think it is more a code bug, but the quickfix would be to correct the documentation.
I have a weird bug when applying less on bootstrap minified css.
I think that a solution may be to apply less compilation only on *.less
files.
It may be usefull too for avoid minification on already minified files (css or js).
Default templates for js and css are working now, but I have two sections with the 'missing htmlTag' error:
Thanks
Rob
It would be nice to have an option to inline scripts or styles.
So instead of
<script src="/myscript.js"></script>
I get
<script>...myscript.js contents...</script>
Thanks
Robert
Hello there,
I few some trouble when i'm make config with many file, can i import config list of file to use in gassetic.yml?
Like symfony have ..
# app/config/config.yml
imports:
- { resource: '%kernel.root_dir%/parameters.yml' }
Maybe like this
...
# This is a cache busting gulp plugin that appends
# an md5 of the contents to the filename
- { name: freeze }
htmlTag: '<link rel="stylesheet" type="text/css" href="{{ asset("%path%") }}">' # custom html tag
# This is the list of source files to apply the above settings
files:
backend.css: # This is the output filename
imports:
- SomeFile.yml # Another config file
...
Hi @crossborne!
It would be great to have a clear
command to remove the script
& style
tags in HTML files.
I'll use it as pre-commit command to always commit clean HTML files.
It's not a critical enhancement, but since I thought about it multiples times, I share it here.
Thanks again for sharing this awesome tool!
Cheers,
Thomas.
Hi,
I got a small bug with the current config:
files:
- "foo/bar.css"
- "baz/bar.css"
The output file name for those files is bar.css
, and the second one override the first.
A temporary solution is to add a freeze
task at the end, but I think this should be treated on the core process.
Hi,
after updating to v1.0.7 I got "missing htmlTag" errors for all my mimetypes.
Shouldn't there a default tag like beofre?
Thanks!
I've created a very simple gassetic.yml
(based on your Symfony docs):
requires:
concat: gulp-concat
uglify: gulp-uglify
freeze: gulp-freeze
minify: gulp-minify-css
mimetypes:
css:
dev:
outputFolder: web/dist/css
webPath: /compiled/css
tasks: []
files:
foo.css:
- src/Acme/DemoBundle/Resources/public/css/demo.css
default:
- css
Please not that there is no replacementPaths
since the example didn't provide one.
I know that's why my <!-- dev:foo.css --><!-- endbuild -->
in /symfony/src/Acme/DemoBundle/Resources/views/layout.html.twig
aren't replaced. However where should replacementPahts
point? To src/**/*Bundle/Resources/view
and keep them under VCS and swear to god everyone will grunt gassetic
before push? That sounds really excessive. I'm guessing that pointing them to app/cache
won't work as well since we're dealing with PHP compiled templates there. How did you manage to make it work?
Gassetic was working great but after updating it, I am now getting a segmentation fault when running gassetic
.
[08:57:00] Tested 2 tests, 2 passes, 0 failures: PASS
[08:57:00] Tested 2 tests, 2 passes, 0 failures: PASS
Segmentation fault
my template
{% if app.environment == 'prod' %}
<!-- prod:jquery.js --><!-- endbuild -->
<!-- prod:bootstrap.js --><!-- endbuild -->
<!-- prod:bootstrap-material-design.js --><!-- endbuild -->
<!-- prod:desktop.js --><!-- endbuild -->
{% else %}
<!-- dev:jquery.js -->
<script src="/tmp/js/jquery.js/jquery.min_0.js"></script>
<!-- endbuild -->
<!-- dev:bootstrap.js -->
<script src="/tmp/js/bootstrap.js/bootstrap.min_0.js"></script>
<!-- endbuild -->
<!-- dev:bootstrap-material-design.js -->
<script src="/tmp/js/bootstrap-material-design.js/material_0.js"></script>
<!-- endbuild -->
<!-- dev:desktop.js -->
<script src="/tmp/js/desktop.js/desktop_0.js"></script>
<script src="/tmp/js/desktop.js/Modal_1.js"></script>
<!-- endbuild -->
{% endif %}
my gassetic.yml
requires:
freeze: gulp-freeze
concat: gulp-concat
uglify: gulp-uglify
minify: gulp-minify
less: gulp-less
mimetypes:
images:
prod:
outputFolder: web/compiled/css/images
tasks: []
autoRenaming: false
dev:
outputFolder: web/tmp/css/images
tasks: []
autoRenaming: false
files:
desktop:
- app/Resources/assets/desktop/images/*
css:
deps:
- "less"
- "fonts"
prod:
outputFolder: web/compiled/css # The output folder for your saving your compiled files
webPath: /compiled/css # The web path for the compiled files
# Run these tasks on your compiled files
tasks:
- { name: minify }
- { name: concat, args: '%filename%' }
# In 'dev' mode, use these settings
dev:
outputFolder: web/tmp/css # The output files will be saved here
# (Add the tmp folder to gitignore so that your
# dev files aren't pushed to your repo)
webPath: /tmp/css # The path used for the frontend
# This is the list of tasks to run on the files
# You can add gulp
tasks: []
autoRenaming: false # turn off autorenaming for dev environment
# In 'prod' mode, use these settings
files:
bootstrap.css:
- bower_components/bootstrap/dist/css/bootstrap.css
simple-line-icons.css:
- bower_components/simple-line-icons/css/simple-line-icons.css
foundation.css:
- bower_components/foundation/css/foundation.css
font-awesome.css:
- bower_components/font-awesome/css/font-awesome.css
bootstrap-material-design.css:
- bower_components/bootstrap-material-design/dist/css/material.min.css
less:
prod:
outputFolder: web/compiled/css # The output folder for your saving your compiled files
webPath: /compiled/css # The web path for the compiled files
# Run these tasks on your compiled files
tasks:
- { name: less }
- { name: minify }
- { name: concat, args: '%filename%' }
dev:
outputFolder: web/tmp/css # The output files will be saved here
# (Add the tmp folder to gitignore so that your
# dev files aren't pushed to your repo)
webPath: /tmp/css # The path used for the frontend
# This is the list of tasks to run on the files
# You can add gulp
tasks:
- { name: less }
autoRenaming: false # turn off autorenaming for dev environment
files:
desktop.css:
- app/Resources/assets/desktop/less/desktop.less
- app/Resources/assets/desktop/css/Modal.css
fonts:
prod:
outputFolder: web/compiled/css
tasks: []
autoRenaming: false
dev:
outputFolder: web/tmp/css
tasks: []
autoRenaming: false
files:
fonts:
- bower_components/simple-line-icons/fonts/*
- bower_components/font-awesome/fonts/*
- bower_components/bootstrap-material-design/dist/fonts/*
js:
prod:
outputFolder: web/compiled/js
webPath: /compiled/js
tasks:
# This task concats all the files into one
- { name: concat, args: '%filename%' }
# This task minifies the scripts
- { name: uglify, args: { mangle: false } }
# This is a cache busting gulp plugin that appends
# an md5 of the contents to the filename
- { name: freeze }
htmlTag: '<script type="text/javascript" src="{{ asset("%path%") }}"></script>'
dev:
outputFolder: web/tmp/js
webPath: /tmp/js
tasks: []
files:
jquery.js:
- bower_components/jquery/dist/jquery.min.js
bootstrap.js:
- bower_components/bootstrap/dist/js/bootstrap.min.js
desktop.js:
- app/Resources/assets/desktop/js/desktop.js
- app/Resources/assets/desktop/js/Modal.js
foundation.js:
- bower_components/foundation/js/foundation.js
bootstrap-material-design.js:
- bower_components/bootstrap-material-design/dist/js/material.js
replacementPaths:
- app/Resources/views/*.html.twig
- src/**/*.html.twig
default:
- js
- css
- images
I have tried with
gassetic build --env=prod
gassetic --env=prod
gassetic
...
it process the files properly, but doesn't replace the build tags on template.
npm install -g gassetic
[email protected] /usr/lib/node_modules/gassetic
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])
root@4e1adb116053:/server# gassetic
module.js:327
throw err;
^
Error: Cannot find module 'babel-runtime/core-js/json/stringify'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/usr/lib/node_modules/gassetic/dist/src/index.js:8:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
For Symfony2 it is recommended that you use the asset() function in twig so that CDN paths can be automatically added to any assets
<script type="text/javascript" src="{{ asset("%path%") }}"></script>
I'm run gassetic and few some problem, in osx & linux compile path use "/" slash for directory separator but in windows compile path use "" backslash. So if i run in browser throw an error "not found" cz
"\temp\css" will compile to "mpcss". How to fix it?
Thanks for advice :)
Gassetic makes direct replacements in the replacement files. In my case none of the compiled assets are committed (or uncompiled vendors either), instead the CI server builds them again as part of the deploy. This means that my index.html
contains script
tags that are not referencing actual files in the repository, and are irrelevant anyway since they get replaced by the CI server's gassetic build
.
Ideally I would have something like this:
replacementPaths:
- { from: base.html.twig, to: compiled.html.twig }
So the base.html.twig
acts as a template and stays pretty static, and I could git-ignore
compiled.html.twig
to make a tidier repo!
Does this make sense? Any thoughts?
It would save some time to only regenerate js or css
Something like this
gassetic build js --env=dev
Firstly, I'm loving gassetic and what it has done for my frontend asset mgmt. Great job! I'd like to request that we add a command line switch (i.e. --config) that would allow one to specify a config file to be used in place of the standard gassetic.yml. gassetic.yml would still remain as the default, but now developers would be able to specify an alternate config (say gassetic_dev.yml) to use that instead. Having this feature would allow us to reduce the amount of environment specific switching that happens in our templates and replace that with environment specific switching in our configs.
Can other gulp plugins be used with gassetic and symfony2/twig? - solved.
requires:
freez: gulp-freeze
# ...
tasks:
- freeze
The "freeze" ('e' is missing) task is not defined, but the console does not explain it, the gassetic
command only exits
Hi,
I have an improvement proposition. It is not really easy, so I open an issue instead of a PR.
Let's imagine this gassetic.yml
file
mimtypes:
css:
dev:
tasks:
- less
prod:
tasks:
- less
- concat
files:
global.css:
- "a.css"
- "b.css"
If I update the a.css
file, the b.css
file is reloaded too instead of reloading only a.css
Of course, with 2 files, we don't really care, but in my project our have, we have 33 css files in the global.css.
Do you thing it could be something doable to only update the wanted file ?
Thanks
For those who use the Twig, construction <-- {env}:{file} -->
can be replaced by {# {env}:{file} #}
for cleaning output html, and default for other users.
Maybe add to gassetic.yaml parameter with default value ['<--', '-->']
?
replace_brackets: ['{#', '#}']
How can I see errors from SASS? I don't understand how I can have the equivalent of:
gulp.task('sass', function () {
return gulp.src('./sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'));
});
Thanks
Hello,
I have an issue with latest version of gassetic. It required a depency on fesevent, which is not compatible with ubuntu 16.04 apprently:
npm/npm#14042 (comment)
The solution in this comment is working, but as it's an optional dependency why just no remove it?
Thx for attention and thx for your work. Have a nice day
Create the following files
Resources/doc/Using-with-Symfony2-twig
Resources/doc/Using-with-Bower
Resources/doc/List-of-gulp-plugins
Resources/doc/examples
When building assets with gassetic, it writes css and js links to twig template with no issues. But when using the gassetic clear
command, it only deletes the css and js files in the output folder and not clear the css and js links in twig.
I've tried:
gassetic clear
gassetic clear --env=dev
gassetic clear --env=prod
Anyone else having this issue?
it doesn't make sense to always run the watch, especially when developing a lot of javascript, or only using the js mimetype.
i would rather turn on watch by adding a --watch flag
gassetic --watch
gassetic build --env=dev --watch
Hi,
I work on a remote server, and very often, when gassetic is in watch mode, I got this error:
[11:52:49] ✗ FAIL: Missing 1 expected files: path/of/the/file/i/just/saved.js
[11:52:49] Tested 38 tests, 37 passes, 1 failures: FAIL
events.js:72
throw er; // Unhandled 'error' event
^
Error in plugin 'gulp-expect-file'
Failed 1 expectations
I think that the "watcher" send an event at the start of the "saving" process.
But the file may take some time to save, and if gassetic lookup the file in the same time, it fails.
Is it possible to wait the saving process to be finish, or to add (maybe as an option) a "wait" timeout, maybe with a number of retries ?
Thanks
Hi,
after updating to v1.0.7 gulp-replace is not working anymore.
My task definition looks like this
Maybe the new version has problems with array args?
Thanks
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.