@times-visuals/times-harness
v1.3.0
Published
Webpack harness environment for The Times website
Downloads
2
Keywords
Readme
Webpack config harness for The Times website
Harness for running local dev inside The Times website
Installation
# Yarn
$ yarn add @times-visuals/times-harness
# npm
$ npm add @times-visuals/times-harness
Usage
const path = require("path");
const webpackGenerator = require("@times-visuals/times-harness");
module.exports = webpackGenerator(
"./src/index.js",
{
baseDirectory: path.resolve(__dirname, "./src"),
distDirectory: path.resolve(__dirname, "./.tmp")
},
"your-component-name",
`<your-component-name example="attribute"></your-component-name>`
);
You can optionally pass a build mode as the final argument – development
(default if not supplied) or production
:
module.exports = webpackGenerator(
"./src/index.js",
{
baseDirectory: path.resolve(__dirname, "./src"),
distDirectory: path.resolve(__dirname, "./.tmp")
},
"your-component-name",
`<your-component-name example="attribute"></your-component-name>`,
"production"
);