-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # package-lock.json # package.json
- Loading branch information
Showing
22 changed files
with
4,197 additions
and
2,945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10.15.1 | ||
14.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require('../../core/js/index'); | ||
import '../../core/js/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
const DEFAULT_CONFIG = { | ||
styleguide: { | ||
search: true, | ||
colors: './content/scss/_colors.scss', | ||
categoryOrder: [ | ||
'Style guide', | ||
'Design patterns', | ||
'Components' | ||
], | ||
componentCategories: { | ||
aov: 'Overviews', | ||
c: 'Components', | ||
} | ||
}, | ||
icons: { | ||
generateIconFont: false, | ||
iconFontPath: "./content/scss/_icon-font.scss", | ||
svgIconClassPrefix: 'o-svg-icon', | ||
iconFontClassPrefix: 'if' | ||
}, | ||
pug: { | ||
pretty: true, | ||
basedir: "./content" | ||
}, | ||
prettify: { | ||
indentWithTabs: true, | ||
preserveNewlines: true, | ||
inline: '', | ||
logSuccess: false, | ||
indentSize: 2, | ||
unformatted: ['pre', 'textarea'], | ||
extraLiners: ['body'] | ||
}, | ||
|
||
express: { | ||
port: 8000, | ||
}, | ||
}; | ||
const config = Object.assign({}, DEFAULT_CONFIG); | ||
|
||
try { | ||
const projectConfig = require('../../bedrock.config'); | ||
Object.assign(config, projectConfig); | ||
} catch (err) { | ||
console.log('No `bedrock.config.js` file was found at the root of your project. Using default configuration.'); | ||
} | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,18 @@ | ||
const watchify = require('watchify'); | ||
const browserify = require('browserify'); | ||
const gulp = require('gulp'); | ||
const source = require('vinyl-source-stream'); | ||
const buffer = require('vinyl-buffer'); | ||
const gutil = require('gulp-util'); | ||
const sourcemaps = require('gulp-sourcemaps'); | ||
const bro = require('gulp-bro'); | ||
const rename = require('gulp-rename'); | ||
const babelify = require('babelify'); | ||
const _ = require('lodash'); | ||
const paths = require('../paths'); | ||
const errors = require('../util/errors'); | ||
|
||
const opts = _.assign({}, watchify.args, { | ||
entries: [paths.content.js.entryFile], | ||
debug: true | ||
}); | ||
|
||
function bundler() { | ||
var bundle = watchify(browserify(opts)); | ||
|
||
bundle.transform(babelify, { | ||
presets: ['es2015'], | ||
plugins: ['transform-decorators-legacy', 'transform-class-properties'] | ||
}); | ||
|
||
bundle.on('update', bundler); | ||
bundle.on('log', gutil.log); | ||
|
||
return bundle.bundle() | ||
.on('error', function (err) { | ||
gutil.log(gutil.colors.red(err)); | ||
this.err = err; | ||
this.emit('end'); | ||
}) | ||
.on('end', function () { | ||
if (this.err) { | ||
errors.updateError('js', { | ||
message: this.err.message, | ||
}); | ||
} else { | ||
errors.clearError('js'); | ||
} | ||
|
||
this.err = null; | ||
}) | ||
.pipe(source('bundle.js')) | ||
.pipe(buffer()) | ||
.pipe(sourcemaps.init({loadMaps: true})) // loads map from browserify file | ||
.pipe(sourcemaps.write('./')) // writes .map file | ||
.pipe(gulp.dest(paths.compiled.js)); | ||
} | ||
const paths = require('../paths'); | ||
|
||
module.exports = bundler; | ||
module.exports = function () { | ||
return gulp.src(paths.content.js.entryFile) | ||
.pipe(bro({ | ||
debug: true, | ||
transform: [ | ||
babelify.configure({ presets: ['@babel/preset-env'] }), | ||
] | ||
})) | ||
.pipe(rename('bundle.js')) | ||
.pipe(gulp.dest(paths.compiled.js)) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.