feat: assets

This commit is contained in:
cha0s 2020-12-20 06:54:49 -06:00
parent 5fc18180b6
commit b3d4b886b0
3 changed files with 76 additions and 2 deletions

View File

@ -2,6 +2,7 @@ require('dotenv/config');
const airbnb = require('@neutrinojs/airbnb'); const airbnb = require('@neutrinojs/airbnb');
const clean = require('@neutrinojs/clean'); const clean = require('@neutrinojs/clean');
const copy = require('@neutrinojs/copy');
const mocha = require('@neutrinojs/mocha'); const mocha = require('@neutrinojs/mocha');
const node = require('@neutrinojs/node'); const node = require('@neutrinojs/node');
const {EnvironmentPlugin} = require('webpack'); const {EnvironmentPlugin} = require('webpack');
@ -21,6 +22,12 @@ module.exports = {
clean({ clean({
cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'], cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'],
}), }),
copy({
patterns: [{
from: 'src/assets',
to: 'http',
}],
}),
mocha(), mocha(),
node(), node(),
(neutrino) => { (neutrino) => {

View File

@ -30,6 +30,7 @@
"devDependencies": { "devDependencies": {
"@neutrinojs/airbnb": "^9.4.0", "@neutrinojs/airbnb": "^9.4.0",
"@neutrinojs/clean": "^9.1.0", "@neutrinojs/clean": "^9.1.0",
"@neutrinojs/copy": "^9.4.0",
"@neutrinojs/mocha": "^9.1.0", "@neutrinojs/mocha": "^9.1.0",
"@neutrinojs/node": "^9.1.0", "@neutrinojs/node": "^9.1.0",
"babel-plugin-webpack-alias": "^2.1.2", "babel-plugin-webpack-alias": "^2.1.2",

View File

@ -1045,6 +1045,13 @@
"@babel/core" "^7.11.4" "@babel/core" "^7.11.4"
babel-loader "^8.1.0" babel-loader "^8.1.0"
"@neutrinojs/copy@^9.4.0":
version "9.4.0"
resolved "https://npm.i12e.cha0s.io/@neutrinojs%2fcopy/-/copy-9.4.0.tgz#258b72297c2feac32d3fc756175fa539c0543d62"
integrity sha512-8Ki7aFHZV+3FNHTDNPfIfOHYVAVDVrv1GGiyHwEGpXEjYIioSVT9KlWXanJpNEJZ2MkEduhljL7mcM5+5yBRcg==
dependencies:
copy-webpack-plugin "^5.1.1"
"@neutrinojs/dev-server@9.4.0": "@neutrinojs/dev-server@9.4.0":
version "9.4.0" version "9.4.0"
resolved "https://npm.i12e.cha0s.io/@neutrinojs%2fdev-server/-/dev-server-9.4.0.tgz#6598c6f320ce8bf3cdeae6e2be9224779965b649" resolved "https://npm.i12e.cha0s.io/@neutrinojs%2fdev-server/-/dev-server-9.4.0.tgz#6598c6f320ce8bf3cdeae6e2be9224779965b649"
@ -2120,7 +2127,7 @@ bytes@3.1.0:
resolved "https://npm.i12e.cha0s.io/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" resolved "https://npm.i12e.cha0s.io/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
cacache@^12.0.2: cacache@^12.0.2, cacache@^12.0.3:
version "12.0.4" version "12.0.4"
resolved "https://npm.i12e.cha0s.io/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" resolved "https://npm.i12e.cha0s.io/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c"
integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==
@ -2590,6 +2597,24 @@ copy-descriptor@^0.1.0:
resolved "https://npm.i12e.cha0s.io/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" resolved "https://npm.i12e.cha0s.io/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
copy-webpack-plugin@^5.1.1:
version "5.1.2"
resolved "https://npm.i12e.cha0s.io/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz#8a889e1dcafa6c91c6cd4be1ad158f1d3823bae2"
integrity sha512-Uh7crJAco3AjBvgAy9Z75CjK8IG+gxaErro71THQ+vv/bl4HaQcpkexAY8KVW/T6D2W2IRr+couF/knIRkZMIQ==
dependencies:
cacache "^12.0.3"
find-cache-dir "^2.1.0"
glob-parent "^3.1.0"
globby "^7.1.1"
is-glob "^4.0.1"
loader-utils "^1.2.3"
minimatch "^3.0.4"
normalize-path "^3.0.0"
p-limit "^2.2.1"
schema-utils "^1.0.0"
serialize-javascript "^4.0.0"
webpack-log "^2.0.0"
core-js-compat@^3.8.0: core-js-compat@^3.8.0:
version "3.8.1" version "3.8.1"
resolved "https://npm.i12e.cha0s.io/core-js-compat/-/core-js-compat-3.8.1.tgz#8d1ddd341d660ba6194cbe0ce60f4c794c87a36e" resolved "https://npm.i12e.cha0s.io/core-js-compat/-/core-js-compat-3.8.1.tgz#8d1ddd341d660ba6194cbe0ce60f4c794c87a36e"
@ -2943,6 +2968,13 @@ diffie-hellman@^5.0.0:
miller-rabin "^4.0.0" miller-rabin "^4.0.0"
randombytes "^2.0.0" randombytes "^2.0.0"
dir-glob@^2.0.0:
version "2.2.2"
resolved "https://npm.i12e.cha0s.io/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
dependencies:
path-type "^3.0.0"
dns-equal@^1.0.0: dns-equal@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" resolved "https://npm.i12e.cha0s.io/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
@ -4170,6 +4202,18 @@ globby@^6.1.0:
pify "^2.0.0" pify "^2.0.0"
pinkie-promise "^2.0.0" pinkie-promise "^2.0.0"
globby@^7.1.1:
version "7.1.1"
resolved "https://npm.i12e.cha0s.io/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA=
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"
globule@^1.0.0: globule@^1.0.0:
version "1.3.2" version "1.3.2"
resolved "https://npm.i12e.cha0s.io/globule/-/globule-1.3.2.tgz#d8bdd9e9e4eef8f96e245999a5dee7eb5d8529c4" resolved "https://npm.i12e.cha0s.io/globule/-/globule-1.3.2.tgz#d8bdd9e9e4eef8f96e245999a5dee7eb5d8529c4"
@ -4521,6 +4565,11 @@ ignore-walk@^3.0.1:
dependencies: dependencies:
minimatch "^3.0.4" minimatch "^3.0.4"
ignore@^3.3.5:
version "3.3.10"
resolved "https://npm.i12e.cha0s.io/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==
ignore@^4.0.6: ignore@^4.0.6:
version "4.0.6" version "4.0.6"
resolved "https://npm.i12e.cha0s.io/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" resolved "https://npm.i12e.cha0s.io/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
@ -6163,7 +6212,7 @@ p-limit@^1.1.0:
dependencies: dependencies:
p-try "^1.0.0" p-try "^1.0.0"
p-limit@^2.0.0, p-limit@^2.2.0: p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1:
version "2.3.0" version "2.3.0"
resolved "https://npm.i12e.cha0s.io/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" resolved "https://npm.i12e.cha0s.io/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
@ -6415,6 +6464,13 @@ path-type@^2.0.0:
dependencies: dependencies:
pify "^2.0.0" pify "^2.0.0"
path-type@^3.0.0:
version "3.0.0"
resolved "https://npm.i12e.cha0s.io/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
dependencies:
pify "^3.0.0"
pause@0.0.1: pause@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://npm.i12e.cha0s.io/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" resolved "https://npm.i12e.cha0s.io/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d"
@ -6446,6 +6502,11 @@ pify@^2.0.0:
resolved "https://npm.i12e.cha0s.io/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" resolved "https://npm.i12e.cha0s.io/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
pify@^3.0.0:
version "3.0.0"
resolved "https://npm.i12e.cha0s.io/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
pify@^4.0.1: pify@^4.0.1:
version "4.0.1" version "4.0.1"
resolved "https://npm.i12e.cha0s.io/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" resolved "https://npm.i12e.cha0s.io/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
@ -7519,6 +7580,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
resolved "https://npm.i12e.cha0s.io/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" resolved "https://npm.i12e.cha0s.io/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
slash@^1.0.0:
version "1.0.0"
resolved "https://npm.i12e.cha0s.io/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=
slice-ansi@^2.1.0: slice-ansi@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://npm.i12e.cha0s.io/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" resolved "https://npm.i12e.cha0s.io/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"