Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write to disk #18

Open
racerpeter opened this issue Nov 15, 2016 · 1 comment
Open

Write to disk #18

racerpeter opened this issue Nov 15, 2016 · 1 comment

Comments

@racerpeter
Copy link

In loader.js before the final return:

var fs = require('fs');
fs.writeFile(this.resourcePath, output);
console.log(this.resourcePath + ' ++++++++++++++++++++\n\n\n');

And I had to remove the absolute paths with a few sed commands:

find . -name *.coffee | xargs sed -ie 's~/Users/peter/workspace/mavenlink/node_modules/~~'
find . -name *.js | xargs sed -ie 's~/Users/peter/workspace/mavenlink/node_modules/~~'
find . -name *.coffeee | xargs rm -f
find . -name *.jse | xargs rm -f
@naganowl
Copy link
Contributor

A gist with some Shell nuggets I've assembled that I've found useful when doing replacements: https://gist.github.com/naganowl/0e6211498e028c606f14ec1140a49996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants