Commit 4ba05da5 authored by David Haynes's avatar David Haynes 🙆

cleanup

parent 388e9dd9
image: node:7.6.0
build_css:
before_script:
- npm install
- npm install -g grunt-cli
- npm install -g bower
- apt-get update
- apt-get install ruby -y
- gem install sass
- bower install --allow-root
script:
- grunt build
artifacts:
paths:
- masonstrap/masonstrap.min.css
image: alpine:latest
pages:
script:
- npm install
- npm install -g grunt-cli
- npm install -g bower
- apt-get update
- apt-get install ruby -y
- gem install sass
- bower install --allow-root
- grunt build
- mkdir .public
- cp index.html demo.html .public
- cp -r masonstrap .public
- cp -r assets .public
- cp -r bower_components .public
- mv .public public
artifacts:
paths:
- public
stage: deploy
script:
- echo 'Nothing to do...'
artifacts:
paths:
- public
only:
- master
api/
assets/
bower_components/
masonstrap/
global/
_config.yml
.bowerrc
.gitignore
bower.json
Gruntfile.js
*/index.html
2/
3/
assets/
bower_components/
custom/
default/
global/
help/
tests/
_config.yml
.bowerrc
.gitignore
.travis.yml
bower.json
CNAME
composer.json
favicon.ico
Gemfile
Gruntfile.js
index.html
*/index.html
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
// Project configuration.
grunt.initConfig({
// Define some variables and options
pkg: grunt.file.readJSON('package.json'),
builddir: 'masonstrap/',
buildtheme: '',
banner: '/*!\n' +
' * <%= pkg.name %> v<%= pkg.version %>\n' +
' * Homepage: <%= pkg.homepage %>\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= pkg.license %>\n' +
' * Based on Bootstrap 4\n' +
'*/\n',
clean: {
build: {
src: ['*/build.scss', '!assets/scss/build.scss']
}
},
concat: {
options: {
banner: '<%= banner %>',
stripBanners: false
},
dist: {
src: [],
dest: ''
}
},
watch: {
files: ['*/_variables.scss', '*/_masonstrap.scss', 'index.html', 'demo.html'],
tasks: 'build',
options: {
livereload: true,
nospawn: true
}
},
exec: {
postcss: {
command: 'npm run postcss'
}
},
connect: {
base: {
options: {
port: 3000,
livereload: true,
open: true
}
},
keepalive: {
options: {
port: 3000,
livereload: true,
keepalive: true,
open: true
}
}
}
});
// Default task (does nothing)
grunt.registerTask('none', function() {});
//
grunt.registerTask('build', 'build masonstrap from scss', function(compress) {
compress = compress === undefined ? true : compress;
let concatSrc = 'assets/scss/build.scss';
let concatDest = 'masonstrap/build.scss';
let scssSrc = 'masonstrap/build.scss';
let scssDest = '<%=builddir%>/masonstrap.css';
let dist = {src: concatSrc, dest: concatDest};
let files = {}; files[scssDest] = scssSrc;
// Set configs
grunt.config('concat.dist', dist);
grunt.config('sass.dist.files', files);
grunt.config('sass.dist.options.style', 'expanded');
grunt.config('sass.dist.options.sourcemap', 'none');
grunt.config('sass.dist.options.precision', 8);
grunt.config('sass.dist.options.unix-newlines', true);
//
grunt.task.run(['concat', 'sass:dist', 'exec:postcss', 'clean:build',
compress ? 'compress:' + scssDest + ':' + '<%=builddir%>/masonstrap.min.css' : 'none']);
});
//
grunt.registerTask('compress', 'compress a generic css with sass', function(fileSrc, fileDst) {
var files = {}; files[fileDst] = fileSrc;
grunt.log.writeln('compressing file ' + fileSrc);
grunt.config('sass.dist.files', files);
grunt.config('sass.dist.options.style', 'compressed');
grunt.task.run(['sass:dist']);
});
grunt.event.on('watch', function(action, filepath) {
grunt.config('buildtheme', 'masonstrap');
});
grunt.registerTask('postcss', 'exec:postcss');
grunt.registerTask('server', 'connect:keepalive');
grunt.registerTask('default', ['connect:base', 'watch']);
};
exclude: ["src", "node_modules", "bower.json", "bower_components/font-awesome/src", "composer.json", "package.json", "README.md", "LICENSE", "Gruntfile.js", "Gemfile"]
include: ["_bootswatch.scss","_variables.scss"]
@import "variables";
@import "../bower_components/bootstrap/scss/bootstrap";
@import "masonstrap";
{
"name": "masonstrap",
"description": "Easily provide any web project with Mason branding",
"author": "Mason SRCT",
"homepage": "https://srct.gmu.edu",
"repository": {
"type": "git",
"url": "git@git.gmu.edu:srct/masonstrap.git"
},
"license": "MIT",
"ignore": [
"api",
"assets",
"bower_components",
"global",
"_config.yml",
".gitignore",
"Gruntfile.js",
"index.html",
"package.json",
"*/index.html"
],
"dependencies": {
"bootstrap": "~4.0.0"
}
}
{
"name": "masonstrap",
"description": "Easily provide any web project with Mason branding",
"version": "4.0.0-alpha.6",
"author": "Mason SRCT",
"homepage": "srct.gmu.edu",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://git.gmu.edu/srct/masonstrap.git"
},
"engines": {
"node": ">= 6.10.0"
},
"scripts": {
"postcss": "postcss --config assets/js/postcss.js --replace */masonstrap*.css"
},
"devDependencies": {
"autoprefixer": "^6.5.0",
"bower": "^1.2.8",
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-exec": "^1.0.1",
"postcss-cli": "^2.6.0",
"postcss-flexbugs-fixes": "^2.0.0"
}
}
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