0.1.0 • Published 7 years ago

webpack-compiler v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

webpack-compiler

Build Status NPM version NPM downloads

var path = require('path')
var webpackCompiler = require('webpack-compiler')

var output = webpackCompiler({
    filepath: path.join(__dirname, 'test/commonjs/index.js'),
    webpack: webpack,
    webpackConfig: {
        module: {
            loaders: [
                {
                    test: /\.css$/,
                    loader: "style!css"
                }
            ]
        }
    },
    content: fs.readFileSync(jspath).toString()
})

output.code: test/commonjs/index.js.output.js output.stats: http://webpack.github.io/docs/node.js-api.html#stats output.stats.compilation.fileDependencies:

[
    "/Users/nimo/Documents/git/markrun-compile-webpack/node_modules/css-loader/lib/css-base.js",
    "/Users/nimo/Documents/git/markrun-compile-webpack/node_modules/style-loader/addStyles.js",
    "/Users/nimo/Documents/git/markrun-compile-webpack/test/commonjs/a.css",
    "/Users/nimo/Documents/git/markrun-compile-webpack/test/commonjs/a.js",
    "/Users/nimo/Documents/git/markrun-compile-webpack/test/commonjs/b.js",
    "/Users/nimo/Documents/git/markrun-compile-webpack/test/commonjs/index.js"
]