diff --git a/.gitignore b/.gitignore index 16e02a37f..16f4178e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ node_modules/ -dist/*.js +dist/san.* dist/*.gz dist/*.map .idea/ diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 000000000..762d3d411 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5 @@ +if (process.env.NODE_ENV === 'production') { + module.exports = require('./san.min.js'); +} else { + module.exports = require('./san.dev.js'); +} \ No newline at end of file diff --git a/package.json b/package.json index e355d1156..ff0aa58ad 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "report-cov": "cat ./coverage/report-lcov/lcov.info | ./node_modules/coveralls/bin/coveralls.js" }, "types": "types", - "main": "dist/san.dev.js", - "browser": "dist/san.dev.js", + "main": "dist/index.js", + "browser": "dist/index.js", "unpkg": "dist/san.min.js", "files": [ "src",