meta: move javascript files for building etc. into a scripts folder

This commit is contained in:
Xymorot 2020-11-12 21:09:43 +01:00
parent 8c56b89f0c
commit 7278d902c1
6 changed files with 13 additions and 17 deletions

View File

@ -45,8 +45,7 @@
"mocks/**/*", "mocks/**/*",
"src/renderer/**/*", "src/renderer/**/*",
"templates/**/*", "templates/**/*",
"buildfile.js", "scripts/**/*"
"forge.config.js"
] ]
} }
], ],

View File

@ -17,14 +17,14 @@
"postinstall": "npm run rebuild", "postinstall": "npm run rebuild",
"start": "electron . --enable-logging --env=dev", "start": "electron . --enable-logging --env=dev",
"rebuild": "electron-rebuild -f -b -t prod,dev,optional", "rebuild": "electron-rebuild -f -b -t prod,dev,optional",
"electron-version": "electron electron-version.js", "electron-version": "electron scripts/electron-version.js",
"typeorm:migrate": "npm run typeorm:migrate:library && npm run typeorm:migrate:store", "typeorm:migrate": "npm run typeorm:migrate:library && npm run typeorm:migrate:store",
"typeorm:migrate:library": "typeorm migration:run -c library", "typeorm:migrate:library": "typeorm migration:run -c library",
"typeorm:migrate:store": "typeorm migration:run -c store", "typeorm:migrate:store": "typeorm migration:run -c store",
"build:webpack": "webpack --config webpack.config.js", "build:webpack": "webpack --config scripts/webpack.config.js",
"dev:webpack": "webpack --config webpack.config.js --mode development -w", "dev:webpack": "webpack --config scripts/webpack.config.js --mode development -w",
"build:index": "node buildfile.js", "build:index": "node scripts/buildfile.js",
"dev:index": "node buildfile.js --watch --dev", "dev:index": "node scripts/buildfile.js --watch --dev",
"build:ts": "tsc", "build:ts": "tsc",
"dev:ts": "tsc -w --pretty --preserveWatchOutput", "dev:ts": "tsc -w --pretty --preserveWatchOutput",
"build": "concurrently -c green,yellow,cyan -n webpack,index,typescript \"npm run build:webpack\" \"npm run build:index\" \"npm run build:ts\"", "build": "concurrently -c green,yellow,cyan -n webpack,index,typescript \"npm run build:webpack\" \"npm run build:index\" \"npm run build:ts\"",
@ -33,7 +33,7 @@
"test": "mocha", "test": "mocha",
"coverage:fast": "nyc npm run test:fast", "coverage:fast": "nyc npm run test:fast",
"coverage": "nyc npm run test", "coverage": "nyc npm run test",
"prelint": "eslint --print-config forge.config.js | eslint-config-prettier-check", "prelint": "eslint --print-config scripts/forge.config.js | eslint-config-prettier-check",
"lint": "eslint ./**/*.* --max-warnings 1", "lint": "eslint ./**/*.* --max-warnings 1",
"lint:fix": "eslint ./**/*.* --fix", "lint:fix": "eslint ./**/*.* --fix",
"prettier": "prettier -c **/*.*", "prettier": "prettier -c **/*.*",
@ -101,7 +101,7 @@
"repository": "https://git.fuwafuwa.moe/Xymorot/RenaiApp", "repository": "https://git.fuwafuwa.moe/Xymorot/RenaiApp",
"bugs": "https://git.fuwafuwa.moe/Xymorot/RenaiApp/issues", "bugs": "https://git.fuwafuwa.moe/Xymorot/RenaiApp/issues",
"config": { "config": {
"forge": "forge.config.js" "forge": "scripts/forge.config.js"
}, },
"husky": { "husky": {
"hooks": { "hooks": {

View File

@ -3,7 +3,7 @@ const path = require('path');
const { watch } = require('chokidar'); const { watch } = require('chokidar');
const { debounce } = require('lodash'); const { debounce } = require('lodash');
const minimist = require('minimist'); const minimist = require('minimist');
const templating = require('./templates'); const templating = require('../templates');
const webpackConfig = require('./webpack.config'); const webpackConfig = require('./webpack.config');
/** @var {Object} argv */ /** @var {Object} argv */

View File

@ -1,4 +1,4 @@
const packageJson = require('./package'); const packageJson = require('../package.json');
const ignoreList = [ const ignoreList = [
/^\/\.idea($|\/)/, /^\/\.idea($|\/)/,
@ -11,6 +11,7 @@ const ignoreList = [
/^\/test-paths($|\/)/, /^\/test-paths($|\/)/,
/^\/types($|\/)/, /^\/types($|\/)/,
/^\/workspace($|\/)/, /^\/workspace($|\/)/,
/^\/scripts($|\/)/,
/^\/\.editorconfig/, /^\/\.editorconfig/,
/^\/\.eslintignore/, /^\/\.eslintignore/,
@ -19,14 +20,10 @@ const ignoreList = [
/^\/\.mocharc\.yml/, /^\/\.mocharc\.yml/,
/^\/\.nycrc\.yml/, /^\/\.nycrc\.yml/,
/^\/\.prettierrc\.yml/, /^\/\.prettierrc\.yml/,
/^\/buildfile\.js/,
/^\/CONTRIBUTING\.md/, /^\/CONTRIBUTING\.md/,
/^\/electron-version\.js/,
/^\/forge\.config\.js/,
/^\/ormconfig\.yml/, /^\/ormconfig\.yml/,
/^\/package-lock\.json/, /^\/package-lock\.json/,
/^\/tsconfig\.json/, /^\/tsconfig\.json/,
/^\/webpack\.config\.js/,
/^\/node_modules\/\.cache($|\/)/, /^\/node_modules\/\.cache($|\/)/,
// test and mock files: // test and mock files:

View File

@ -2,10 +2,10 @@ const path = require('path');
module.exports = { module.exports = {
mode: 'production', mode: 'production',
entry: path.resolve(__dirname, 'src/renderer.ts'), entry: path.resolve(__dirname, '../src/renderer.ts'),
target: 'electron-renderer', target: 'electron-renderer',
output: { output: {
path: path.resolve(__dirname, 'frontend'), path: path.resolve(__dirname, '../frontend'),
filename: 'bundle.js', filename: 'bundle.js',
}, },
module: { module: {