refactor: move files to source folder
@ -3,7 +3,9 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"no-console": 0,
|
"no-console": 0,
|
||||||
"no-extend-native": 0,
|
"no-extend-native": 0,
|
||||||
"react/jsx-filename-extension": [1, { "extensions": [".jsx", "tsx"] }],
|
"react/jsx-filename-extension": [1, {
|
||||||
|
"extensions": [".jsx", "tsx"]
|
||||||
|
}],
|
||||||
"react/jsx-props-no-spreading": 0,
|
"react/jsx-props-no-spreading": 0,
|
||||||
"jsx-a11y/label-has-associated-control": 0,
|
"jsx-a11y/label-has-associated-control": 0,
|
||||||
"prettier/prettier": [
|
"prettier/prettier": [
|
||||||
@ -20,7 +22,7 @@
|
|||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
"node": {
|
"node": {
|
||||||
"extensions": [".js", ".jsx", ".ts", ".tsx"],
|
"extensions": [".js", ".jsx", ".ts", ".tsx"],
|
||||||
"moduleDirectory": ["node_modules", "src/"]
|
"moduleDirectory": ["node_modules", "source/"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,7 +93,7 @@ Then run the following:
|
|||||||
- Check the `Developer Mode` and load as unpacked from extension’s extracted directory.
|
- Check the `Developer Mode` and load as unpacked from extension’s extracted directory.
|
||||||
|
|
||||||
### Generating browser specific manifest.json
|
### Generating browser specific manifest.json
|
||||||
Update `src/manifest.json` file with browser vendor prefixed manifest keys
|
Update `source/manifest.json` file with browser vendor prefixed manifest keys
|
||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@ -19,6 +19,6 @@
|
|||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"source"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -12,7 +12,7 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
|
|
||||||
const viewsPath = path.join(__dirname, 'views');
|
const viewsPath = path.join(__dirname, 'views');
|
||||||
const sourcePath = path.join(__dirname, 'src');
|
const sourcePath = path.join(__dirname, 'source');
|
||||||
const destPath = path.join(__dirname, 'extension');
|
const destPath = path.join(__dirname, 'extension');
|
||||||
const nodeEnv = process.env.NODE_ENV || 'development';
|
const nodeEnv = process.env.NODE_ENV || 'development';
|
||||||
const targetBrowser = process.env.TARGET_BROWSER;
|
const targetBrowser = process.env.TARGET_BROWSER;
|
||||||
@ -143,7 +143,7 @@ module.exports = {
|
|||||||
// write css file(s) to build folder
|
// write css file(s) to build folder
|
||||||
new MiniCssExtractPlugin({ filename: 'css/[name].css' }),
|
new MiniCssExtractPlugin({ filename: 'css/[name].css' }),
|
||||||
// copy static assets
|
// copy static assets
|
||||||
new CopyWebpackPlugin([{ from: 'src/assets', to: 'assets' }]),
|
new CopyWebpackPlugin([{ from: 'source/assets', to: 'assets' }]),
|
||||||
// plugin to enable browser reloading in development mode
|
// plugin to enable browser reloading in development mode
|
||||||
extensionReloaderPlugin,
|
extensionReloaderPlugin,
|
||||||
],
|
],
|
||||||
|
|||||||