1.0.13 • Published 8 years ago

splitfile v1.0.13

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

#Split file

Split sections of code into separate files and folders.

Just define input file to separate files and folders. This feature is useful if you want to store multiple parts of code in one file and export them to separated files.

Example usage: writing component which combine html, javaScript, css and documentation in one file and split each section into file with proper extension (like component.html, component.js, .component.css, ./doc/component_readme.md).

Installation

npm install splitfile

and then

var splitfile = require('splitfile');

splitfile('/path/to/source/file/example.file');

Example file

<splitSection output="style/style.css">
  /* code for style.css file goes here... */
</splitSection>

<splitSection output="pages/main.html">
  <!-- code for main.html goes here... -->
</splitSection>

<splitSection output="scripts/script.js">
  // code for script.js goes here...
</splitSection>

Additional notes

  • Output attribute is relative to the path of source file.
  • Output code is automatically trimmed from new lines at begin and end.

If you find this project useful, you can always drop me a line at http://prettyminimal.com or http://dariuszsikorski.pl

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago