refactor: move files to source folder

This commit is contained in:
abhijithvijayan 2020-04-07 23:43:12 +05:30
parent 41c17c6b97
commit c05ad5bd60
20 changed files with 14 additions and 12 deletions

View File

@ -1,9 +1,11 @@
{
"extends":["onepass"],
"extends": ["onepass"],
"rules": {
"no-console": 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,
"jsx-a11y/label-has-associated-control": 0,
"prettier/prettier": [
@ -17,11 +19,11 @@
]
},
"settings": {
"import/resolver": {
"node": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
}
}
}
"moduleDirectory": ["node_modules", "source/"]
}
}
}
}

View File

@ -93,7 +93,7 @@ Then run the following:
- Check the `Developer Mode` and load as unpacked from extensions extracted directory.
### 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
{

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -19,6 +19,6 @@
"skipLibCheck": true,
},
"include": [
"src"
"source"
]
}

View File

@ -12,7 +12,7 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
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 nodeEnv = process.env.NODE_ENV || 'development';
const targetBrowser = process.env.TARGET_BROWSER;
@ -143,7 +143,7 @@ module.exports = {
// write css file(s) to build folder
new MiniCssExtractPlugin({ filename: 'css/[name].css' }),
// 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
extensionReloaderPlugin,
],