travis-hilterbrand / grunt-file-creator Goto Github PK
View Code? Open in Web Editor NEWA grunt task that creates/ writes to files from Javascript functions in the grunt config (useful for config files, etc)
License: MIT License
A grunt task that creates/ writes to files from Javascript functions in the grunt config (useful for config files, etc)
License: MIT License
Looks like the last commit was in 2015. Is this project still maintained or should it be considered EOL?
Was trying to programatically set my targets when I ran into the issue mentioned in this stack overflow thread:
http://stackoverflow.com/a/20293903/1008162
Any chance of changing
var filepath = item.key;
to:
var filepath = grunt.template.process(item.key);
I see its on line 45 now: https://github.com/travis-hilterbrand/grunt-file-creator/blob/master/tasks/file-creator.js#L45
Hello
Is it possible to do something like:
"file-creator": {
'moduleFile': {
'sites/all/modules/custom/<%= grunt.option("folderName") %>/<%= grunt.option("folderName") %>.module': function(fs, fd, done) {
fs.writeSync(fd, 'test');
done();
}
},
}
Thanks !
Verifying property file-creator.basic exists in config...OK
Warning: Object function (fs, fd, done) {
fs.writeSync(fd, 'some basic text');
done();
} has no method 'indexOf' Use --force to continue.
my file object looks like this
"<%= opt.debugPath%>/timestamp.txt"
And I get the following error -
Warning: ENOENT, no such file or directory '<%= opt.debugPath%>/timestamp.txt' Use --force to continue.
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
I am generating a config file with the open flag 'wx'. So at the first build the config file will be generated for me. Now I can change some config values in it if I want (e.g. local file paths, login credentials and so on). If I rebuild the project I don't want to regenarte my config because it would override my custom changes. So I set the open flag to 'wx' (fails if path exists).
Now the entire build fails with "Warning: EEXIST, file already exists '.mySettings' Use --force to continue.".
Since I don't want to use --force, would it be possible to only show a warning but not abort the entire build? (like a try/catch) Or is this something Grunt does not allow for plugins?
Is there a way to write to a file and make sure it has a unix line ending with file-creator?
It is not possible to write an JSON object!? I think it is a very good feature.
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.