Comments (6)
I was able to reproduce and two issues happened, all fixed now and published as 1.0.6
.
Note: You are trying to run cat index.html | injectassets -G 'js/*.js;css/*.css' -w -o index.html
where the source template (index.html
) would be overwritten in the process (as -o
points to the same file) which would probably trigger an infinite loop. I would recommend not combining -w
and writing the same file.
from injectassets.
Ok. Thank you. Is there any way to automatically inject an asset file every time I create a new one?
from injectassets.
Do you mind to elaborate?
every time I create a new one?
What do you mean by a new one?
If you're talking about the source template being regenerated and you want to re inject it, then I need watch mode to watch for the template as well. Shouldn't be too hard.
Your scenario (watch + inject right in the source template) however would not be possible: it would create and infinite loop.
from injectassets.
What I'm trying to achieve is every time I create a new js file in my
project, automatically inject the script tag in the index.html file. Is
this possible?
El 26/01/16 a las 10:35, Arnaud Rinquin escribió:
Do you mind to elaborate?
every time I create a new one?
What do you mean by /a new one/?
—
Reply to this email directly or view it on GitHub
#3 (comment).
from injectassets.
Yeah it's definitely possible, the command you tried to use would work. You should just change it so the source template and target output files are different, something like the following will work:
cat src/index.html | injectassets -g 'js/*.js;css/*.css' -w -o dist/index.html
Note the difference between -g
and -G
. The first lets you inject references while the other is for inlining content.
from injectassets.
Ok. Thank you for your help.
El 26/01/16 a las 10:56, Arnaud Rinquin escribió:
Yeah it's definitely possible, the command you tried to use would
work. You should just change it so the source template and target
output files are different, something like the following will work:|cat src/index.html | injectassets -G 'js/.js;css/.css' -w -o
dist/index.html |—
Reply to this email directly or view it on GitHub
#3 (comment).
from injectassets.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from injectassets.