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": { "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/"]
} }
} }
} }

View File

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

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, "skipLibCheck": true,
}, },
"include": [ "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 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,
], ],