1.0.4 • Published 7 years ago

jsn-loader v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

jsn-loader

This is webpack loader converts your dynamic configuration to static.

Usage

Just add the loader to your webpack configuration

  module.exports = {
    module: {
      rules: [
        { 
          test: /\.jsn$/, 
          use: 'jsn-loader'
        }
      ]
    }
 };

Example

Before

This is your dynamic configuration file

const os = require("os");
var foo = 1;

module.exports = {
  bar: foo + 1,
  foo: foo++,
  arr: ["npm", "run", "start"].join(" "),
  platform: os.platform()
};

After

This is your static configuration file

{
  "bar": 2,
  "foo": 2,
  "arr": "npm run start",
  "platform": "linux"
}
1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago