Verified Commit 0ca0adb7 authored by David Haynes's avatar David Haynes 🙆
Browse files

Continue to work on the build system

- standardize locations of things
parent 7445a713
Pipeline #1569 passed with stage
in 37 seconds
"scripts": {
"sass-compile": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 ./masonstrap/masonstrap.scss ./public/assets/css/masonstrap.css",
"sass-prefix": "npx postcss ./public/assets/css/masonstrap.css --use autoprefixer -d ./public/assets/css/",
"sass-minify": "cleancss --source-map --source-map-inline-sources -o ./public/assets/css/masonstrap.min.css ./public/assets/css/masonstrap.css",
"copy-fonts": "cp -r ./node_modules/font-awesome/fonts/ ./public/assets/",
"copy-js": "cp ./node_modules/jquery/dist/jquery.min.js ./public/assets/js/jquery.min.js && cp ./node_modules/jquery/dist/ ./public/assets/js/ && cp ./node_modules/bootstrap/dist/js/bootstrap.min.js ./public/assets/js/bootstrap.min.js && cp ./node_modules/popper.js/dist/umd/popper.min.js ./public/assets/js/popper.min.js && cp ./node_modules/popper.js/dist/umd/ ./public/assets/js/",
"build-masonstrap": "npm-run-all copy-js copy-fonts sass-compile sass-prefix sass-minify",
"sass-watch": "onchange './masonstrap/*.scss' -- npm run build-masonstrap",
"http": "http-server -r -p 8000",
"start": "npm-run-all copy-js copy-fonts sass-watch",
"dev": "npm-run-all --parallel build-masonstrap start http"
// Gulp Imports
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var uglifycss = require('gulp-uglifycss');
var rename = require("gulp-rename");
const gulp = require('gulp');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const uglifycss = require('gulp-uglifycss');
const rename = require("gulp-rename");
gulp.task('sass', function () {
return gulp.src('./masonstrap/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(rename({extname: ".min.css"}))
// Reusable directories
const src = './src/'
const dest = './dist/'
// Compile, autoprefix, minify scss
gulp.task('sass', () => gulp.src(src + '/scss/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(dest + '/css/'))
.pipe(rename({extname: ".min.css"}))
.pipe(gulp.dest(dest + '/css/')));
gulp.task('sass:watch', function () {'./masonstrap/**/*.scss', ['sass']);
gulp.task('watch', () => {
// Run `sass` task whenever scss files change + '/scss/*.scss', ['sass'])
// Run all tasks
gulp.task('run', ['sass']);
gulp.task('default', ['run', 'watch'])
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment