Remove the dependency on bower

This commit is contained in:
Kevin MacMartin 2020-01-17 00:43:25 -05:00
parent 8757a67ae2
commit 774bc5da0d
9 changed files with 72 additions and 34 deletions

1
.gitignore vendored
View file

@ -4,7 +4,6 @@
.env.backup
npm-debug.log
yarn-error.log
/bower_components
/node_modules
/public/css
/public/fonts

View file

@ -1,14 +0,0 @@
{
"name": "hypothetical-template",
"version": "1.0.0",
"authors": [
"Kevin MacMartin <prurigro@gmail.com>"
],
"description": "The Hypothetical website template",
"license": "MIT",
"dependencies": {
"simplemde": "~1.11.2",
"SpinKit": "~1.2.5",
"list.js": "^1.5.0"
}
}

12
gulpfile.js vendored
View file

@ -36,9 +36,9 @@ if (!isProduction) {
// Declare plugin settings
const sassOutputStyle = isProduction ? "compressed" : "expanded",
sassPaths = [ "bower_components", "node_modules" ],
sassPaths = [ "node_modules" ],
autoprefixerSettings = { remove: false, cascade: false },
vuePaths = [ "./bower_components", "./node_modules", "./resources/components", "./resources/js" ];
vuePaths = [ "./node_modules", "./resources/components", "./resources/js" ];
// Javascript files for the public site
const jsPublic = "resources/js/app.js";
@ -62,15 +62,15 @@ const jsDashboardLibs = [
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/flatpickr/dist/flatpickr.js",
"node_modules/sortablejs/Sortable.js",
"bower_components/list.js/dist/list.js",
"bower_components/simplemde/dist/simplemde.min.js"
"node_modules/list.js/dist/list.js",
"node_modules/simplemde/dist/simplemde.min.js"
];
// CSS libraries for the dashboard
const cssDashboardLibs = [
"node_modules/flatpickr/dist/flatpickr.css",
"bower_components/simplemde/dist/simplemde.min.css",
"bower_components/SpinKit/css/spinners/11-folding-cube.css"
"node_modules/simplemde/dist/simplemde.min.css",
"node_modules/spinkit/css/spinners/11-folding-cube.css"
];
// Paths to folders containing fonts that should be copied to public/fonts/

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Dependencies
deps=('bower' 'composer' 'egrep' 'npm' 'php' 'sed')
deps=('composer' 'egrep' 'npm' 'php' 'sed')
# Default settings
no_db=0
@ -102,9 +102,6 @@ sed -i 's|^CACHE_BUST=.*|CACHE_BUST='"$(LC_CTYPE=C LANG=C tr -dc A-Za-z0-9 </dev
msg "Running: ${c_m}npm install --production"
npm install --production || error "${c_m}npm install --production$c_w exited with an error status"
msg "Running: ${c_m}bower prune && bower install"
bower prune && bower install || error "${c_m}bower prune && bower install$c_w exited with an error status"
msg "Running: ${c_m}gulp --production"
"$(npm bin)/gulp" --production || error "${c_m}gulp --production$c_w exited with an error status"

51
package-lock.json generated
View file

@ -1955,6 +1955,19 @@
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"codemirror": {
"version": "5.50.2",
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.50.2.tgz",
"integrity": "sha512-PPjUsC1oXSM86lunKrw609P1oM0Wu8z9rqzjbeyBYCcx44VL41aUpccdOf1PfAZtTONlmN3sT3p2etLNYa1OGg=="
},
"codemirror-spell-checker": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz",
"integrity": "sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=",
"requires": {
"typo-js": "*"
}
},
"collection-map": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
@ -5277,6 +5290,14 @@
"integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==",
"dev": true
},
"list.js": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/list.js/-/list.js-1.5.0.tgz",
"integrity": "sha1-pMv8goHd78Av2y0wyHSL+uJfvNo=",
"requires": {
"string-natural-compare": "^2.0.2"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@ -5429,6 +5450,11 @@
"object-visit": "^1.0.0"
}
},
"marked": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.0.tgz",
"integrity": "sha512-MyUe+T/Pw4TZufHkzAfDj6HarCBWia2y27/bhuYkTaiUnfDYFnCP3KUN+9oM7Wi6JA2rymtVYbQu3spE0GCmxQ=="
},
"matchdep": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
@ -7615,6 +7641,16 @@
}
}
},
"simplemde": {
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/simplemde/-/simplemde-1.11.2.tgz",
"integrity": "sha1-ojo12XjSxA7wfewAjJLwcNjggOM=",
"requires": {
"codemirror": "*",
"codemirror-spell-checker": "*",
"marked": "*"
}
},
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@ -7993,6 +8029,11 @@
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
},
"spinkit": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/spinkit/-/spinkit-1.2.5.tgz",
"integrity": "sha1-kPn0ZqIOjjnvJNqVnB5hHCow3VQ="
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@ -8171,6 +8212,11 @@
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
"string-natural-compare": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-2.0.3.tgz",
"integrity": "sha512-4Kcl12rNjc+6EKhY8QyDVuQTAlMWwRiNbsxnVwBUKFr7dYPQuXVrtNU4sEkjF9LHY0AY6uVbB3ktbkIH4LC+BQ=="
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@ -8546,6 +8592,11 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typo-js": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.1.0.tgz",
"integrity": "sha512-W3kLbx+ML9PBl5Bzso/lTvVxk4BCveSNAtQeht59FEtxCdGThmn6wSHA4Xq3eQYAK24NHdisMM4JmsK0GFy/pg=="
},
"ua-parser-js": {
"version": "0.7.17",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",

View file

@ -29,9 +29,12 @@
"gulp-strip-debug": "^3.0.0",
"gulp-uglify": "^3.0.2",
"jquery": "^3.4.1",
"list.js": "^1.5.0",
"minimist": "^1.2.0",
"popper.js": "^1.16.0",
"simplemde": "^1.11.2",
"sortablejs": "^1.10.2",
"spinkit": "^1.2.5",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
"vue": "^2.6.11",

View file

@ -40,9 +40,8 @@ The following steps are performed in this order when run:
7. Updates the `CACHE_BUST` variable in the `.env` file, which changes the value of a `version` query string appended to compiled assets and prevents clients from using a previous version in their cache.
8. (artisan) Run new database migrations.
9. Cleans, downloads and updates npm dependencies.
10. Cleans, downloads and updates bower dependencies.
11. Runs `gulp --production` to build project files and copy fonts to `public/fonts` (uses the local version of gulp installed in `node_modules`).
12. (artisan) Takes the website out of maintenance mode.
10. Runs `gulp --production` to build project files and copy fonts to `public/fonts` (uses the local version of gulp installed in `node_modules`).
11. (artisan) Takes the website out of maintenance mode.
**NOTE**: Items with `(artisan)` prepended to them won't be run if `init.sh` is run with the `--no-artisan` flag.
@ -91,7 +90,7 @@ The following list of files and directories are where various pieces of the publ
* `resources/sass/classes`: General stylesheets for classes that can be used anywhere
* `resources/sass/mixins`: Stylesheets declaring SCSS mixins for use in other stylesheets
Dependencies can be included with bower or npm and loaded either into the `jsPublicLibs` array in the gulpfile or imported in the javascript.
Dependencies can be included with npm and loaded either into the `jsPublicLibs` array in the gulpfile or imported in the javascript.
Other information about database interaction, routing, controllers, etc can be viewed in the [Laravel Documentation](https://laravel.com/docs).

View file

@ -29,7 +29,7 @@ if (!isProduction) {
// Declare plugin settings
const sassOutputStyle = isProduction ? "compressed" : "expanded",
sassPaths = [ "bower_components", "node_modules" ],
sassPaths = [ "node_modules" ],
autoprefixerSettings = { remove: false, cascade: false };
// Javascript files for the public site
@ -60,15 +60,15 @@ const jsDashboardLibs = [
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/flatpickr/dist/flatpickr.js",
"node_modules/sortablejs/Sortable.js",
"bower_components/list.js/dist/list.js",
"bower_components/simplemde/dist/simplemde.min.js"
"node_modules/list.js/dist/list.js",
"node_modules/simplemde/dist/simplemde.min.js"
];
// CSS libraries for the dashboard
const cssDashboardLibs = [
"node_modules/flatpickr/dist/flatpickr.css",
"bower_components/simplemde/dist/simplemde.min.css",
"bower_components/SpinKit/css/spinners/11-folding-cube.css"
"node_modules/simplemde/dist/simplemde.min.css",
"node_modules/spinkit/css/spinners/11-folding-cube.css"
];
// Paths to folders containing fonts that should be copied to public/fonts/

View file

@ -27,9 +27,12 @@
"gulp-strip-debug": "^3.0.0",
"gulp-uglify": "^3.0.2",
"jquery": "^3.4.1",
"list.js": "^1.5.0",
"minimist": "^1.2.0",
"popper.js": "^1.16.0",
"simplemde": "^1.11.2",
"sortablejs": "^1.10.1",
"spinkit": "^1.2.5",
"what-input": "^5.2.6"
}
}