Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ws week picker range #113

Closed
wants to merge 97 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
b03b3ab
Implemented automatic release version and changelog generation
fragsalat Jun 2, 2017
6bd7309
feat(Tile chart) - highlight tiles from the group on mouse over
Jun 2, 2017
7fc8afb
Merge branch 'tile-chart-mouse-events' into tile-chart-group-highlight
Jun 2, 2017
f8d34ea
Generate dist files
Jun 2, 2017
2868ef0
feat(documentation): Fixed api doc generation, added doc for dropdown…
fragsalat Jun 2, 2017
4ae06b4
feat(dropdown): Drop down support for disabled property (#75)
joeseba Jun 2, 2017
9dd566f
feat(tile-chart): Added mouse events and generated docs
inanda Jun 6, 2017
92060a5
fix(documentation): Fixed API generation to only generate one file pe…
fragsalat Jun 6, 2017
cff822d
Merge branch 'master' of github.com:wholesale-design-system/component…
fragsalat Jun 6, 2017
86a10ae
feat(ci): Implemented automatic release version and changelog generat…
fragsalat Jun 6, 2017
b167e89
Merge branch 'master' into doc-generation
fragsalat Jun 6, 2017
6bc8e65
docs(contributing.md): Updated Contrib guidelines
fokusferit Jun 6, 2017
db70b00
Merge branch 'master' into tile-chart-group-highlight
Jun 6, 2017
4573649
Moved document linting into separate task
fragsalat Jun 7, 2017
425a32a
feat(documentation): Automatically generate documentation on build
fragsalat Jun 8, 2017
5cf0951
Merge pull request #83 from wholesale-design-system/fokusferit-patch-1
faboweb Jun 12, 2017
56dff71
docs(contributing.md): Updated Contrib guidelines
fokusferit Jun 6, 2017
3a33772
bug(week-picker): rendered week-picker usable again + styling
faboweb Jun 12, 2017
63436b2
Merge pull request #85 from wholesale-design-system/ws-week-picker
faboweb Jun 15, 2017
9334f13
Merge pull request #84 from wholesale-design-system/tile-chart-group-…
inanda Jun 15, 2017
adafaec
feat(documentation): Added new doc for date picker and notification
fragsalat Jun 16, 2017
dd73931
Merge branch 'master' of github.com:wholesale-design-system/component…
fragsalat Jun 16, 2017
87b21f8
Set real email
fragsalat Jun 16, 2017
3e599ae
Fixed PR feedback, removed obsolete docs folder
fragsalat Jun 20, 2017
d881fbb
Should fix a small bug regarding the filter function
Jun 22, 2017
76e2bc0
added documentation md
faboweb Jun 29, 2017
9ad94c9
fix(date-picker): Made changing format of date picker only global pos…
fragsalat Jun 29, 2017
2f8532b
fix(documentation): Changed dropdown disabled documentation
fragsalat Jun 29, 2017
8c8bff8
added change event if no function callback defined
faboweb Jun 29, 2017
e89e0e6
feat(documentation): Automatically generate documentation on build
fragsalat Jun 8, 2017
2ab20fe
docs(contributing.md): Updated Contrib guidelines
fokusferit Jun 6, 2017
1429371
docs(contributing.md): Updated Contrib guidelines
fokusferit Jun 6, 2017
9af5787
bug(week-picker): rendered week-picker usable again + styling
faboweb Jun 12, 2017
9a4b6c4
The tiles chart container should use maxHeight instead of height
May 29, 2017
d5522aa
fix(ws-tile-chart): Fix to not break when there aren't any groups to …
May 30, 2017
a3fd17e
Generate dist files
May 30, 2017
b9face7
feat(Tile chart) - highlight tiles from the group on mouse over
Jun 2, 2017
03c0285
Tile chart: Add size unit to the documentation
Jun 1, 2017
31995c7
Generate dist files
Jun 2, 2017
135cc10
removing one babel config file
faboweb Jun 30, 2017
248f819
fix(week-picker): linting
faboweb Jun 30, 2017
0df8723
fix(week-picker): linting
faboweb Jun 30, 2017
8ad1613
Merge pull request #86 from wholesale-design-system/doc-generation
fragsalat Jul 4, 2017
c7710f4
Bumped version to 1.0.1 [skip ci]
fragsalat Jul 4, 2017
c3892af
Bumped version to 1.0.2 [skip ci]
fragsalat Jul 4, 2017
9b6520c
Merge pull request #91 from wholesale-design-system/add-more-tests
fokusferit Jul 4, 2017
eb571b6
Bumped version to 1.0.3 [skip ci]
fragsalat Jul 4, 2017
1edc8b0
fix(week-picker) implemented thomas easier wait function
faboweb Jul 5, 2017
987ab01
feat(documentation): Fixed api doc generation, added doc for dropdown…
fragsalat Jun 2, 2017
1bedaae
fix(documentation): Fixed API generation to only generate one file pe…
fragsalat Jun 6, 2017
79067e3
Moved document linting into separate task
fragsalat Jun 7, 2017
00c9de4
feat(documentation): Added new doc for date picker and notification
fragsalat Jun 16, 2017
5d0c761
feat(documentation): Automatically generate documentation on build
fragsalat Jun 8, 2017
2e44577
docs(contributing.md): Updated Contrib guidelines
fokusferit Jun 6, 2017
5ffa444
docs(contributing.md): Updated Contrib guidelines
fokusferit Jun 6, 2017
886a556
bug(week-picker): rendered week-picker usable again + styling
faboweb Jun 12, 2017
d33737c
The tiles chart container should use maxHeight instead of height
May 29, 2017
641f460
fix(ws-tile-chart): Fix to not break when there aren't any groups to …
May 30, 2017
86a9cc6
Generate dist files
May 30, 2017
314e863
feat(Tile chart) - highlight tiles from the group on mouse over
Jun 2, 2017
8e0d0f8
Tile chart: Add size unit to the documentation
Jun 1, 2017
84a19e7
Tile chart - generated docs
Jun 2, 2017
d6ab76d
Generate dist files
Jun 2, 2017
170d68f
Set real email
fragsalat Jun 16, 2017
d76a0b6
Fixed PR feedback, removed obsolete docs folder
fragsalat Jun 20, 2017
489bb38
fix(date-picker): Made changing format of date picker only global pos…
fragsalat Jun 29, 2017
ee9e605
fix(documentation): Changed dropdown disabled documentation
fragsalat Jun 29, 2017
41ed003
merged master
faboweb Jul 5, 2017
34111ac
Merge pull request #90 from wholesale-design-system/ws-week-picker-pr…
faboweb Jul 5, 2017
3e2b430
Bumped version to 1.0.4 [skip ci]
fragsalat Jul 5, 2017
ed83683
fix(dropdown): Show correct label for preselected value (#94)
inanda Jul 10, 2017
983047f
Bumped version to 1.0.5 [skip ci]
fragsalat Jul 10, 2017
535ada0
fix(date-picker): Fixed styling according to the design system
fragsalat Jul 18, 2017
8cd687e
fix(week-picker): Fixed week picker according to the design system
fragsalat Jul 18, 2017
a25c878
fix(dropdown): Made dropdown as wide as select is (#97)
fragsalat Jul 18, 2017
952d546
Merge pull request #95 from wholesale-design-system/fixed-date-week-p…
fragsalat Jul 18, 2017
2ac21a1
Bumped version to 1.0.6 [skip ci]
fragsalat Jul 18, 2017
93f5db0
feat(header): Implemented new header with authentication, locale mana…
fragsalat Jul 18, 2017
e711d34
Temporarily disable eslint in spec file
fragsalat Jul 18, 2017
a0871b1
fix(header): Fixed shadows and unit tests
fragsalat Jul 19, 2017
b4f24b7
Merge branch 'master' of github.com:wholesale-design-system/component…
fragsalat Jul 19, 2017
37d48d3
Fixed dependencies
fragsalat Jul 19, 2017
352aa0e
fix(tiles-chart): update tile size when rerendering
Jul 20, 2017
13534e7
Merge pull request #102 from wholesale-design-system/tilechart-update…
inanda Jul 21, 2017
2c1ddb2
Bumped version to 1.0.7 [skip ci]
fragsalat Jul 21, 2017
a157a43
fix(notification): removeEventListener should have 2 arguments not on…
tonysaad Jul 21, 2017
7da52bc
Bumped version to 1.0.8 [skip ci]
fragsalat Jul 21, 2017
44a2237
fix(header): Refactored header to use simpler callback approach inste…
fragsalat Jul 21, 2017
e2f608b
fix(header): Fixed icon alignment
fragsalat Jul 21, 2017
8ed5d0b
Merge pull request #99 from wholesale-design-system/ws-header
fragsalat Jul 21, 2017
ada7e03
Bumped version to 1.0.9 [skip ci]
fragsalat Jul 21, 2017
7825a38
fix(dropdown): Fixed text generation for dropdowns with type != select
fragsalat Jul 27, 2017
3edce09
fix(header): Fixed style of application logo
fragsalat Jul 27, 2017
6eaa751
Merge pull request #107 from wholesale-design-system/dropdown-text-fix
fragsalat Jul 27, 2017
653a44c
Bumped version to 1.0.10 [skip ci]
fragsalat Jul 27, 2017
6889615
added fix for setstate on weekpicker
faboweb Aug 22, 2017
e2aaea4
added range
faboweb Aug 22, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ You'll get feedback about your pull request as soon as possible.

As we are generating changelogs based on successfully merged pull-requests we have to enforce a specific layout for git commit messages.

The general layout of commit messages should be `<type>(<component(s)>): <message>`

_patches:_

```sh
Expand All @@ -43,5 +45,5 @@ _other changes:_
You decide, e.g., docs, chore, etc.

```sh
git commit -a -m "docs: fixed up the docs a bit"
```
git commit -a -m "docs(component): fixed up the docs a bit"
```
14 changes: 0 additions & 14 deletions babelrc.js

This file was deleted.

14 changes: 8 additions & 6 deletions build/args.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
var yargs = require('yargs');
const yargs = require('yargs');

var argv = yargs.argv;
var validBumpTypes = 'major|minor|patch|prerelease'.split('|');
var bump = (argv.bump || 'patch').toLowerCase();
const argv = yargs.argv;
const validBumpTypes = 'major|minor|patch|prerelease'.split('|');
const bump = (argv.bump || 'patch').toLowerCase();

if (validBumpTypes.indexOf(bump) === -1) {
throw new Error('Unrecognized bump "' + bump + '".');
}

module.exports = {
bump: bump,
depth: parseInt(argv.depth || '0')
bump,
depth: parseInt(argv.depth || '0', 10),
token: argv.token,
branch: argv.branch
};
4 changes: 2 additions & 2 deletions build/paths.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const appRoot = 'src/';
const outputRoot = 'dist/';
const docsOutput = 'docs/';
const testRoot = 'tests/';

module.exports = {
Expand All @@ -10,7 +9,8 @@ module.exports = {
html: appRoot + '**/*.html',
css: appRoot + '**/*.scss',
output: outputRoot,
docsOutput: docsOutput.concat('api/'),
doc: './doc',
apiDoc: './doc/api',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/'
};
74 changes: 43 additions & 31 deletions build/tasks/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,57 @@ const glob = require('glob');
const del = require('del');
const vinylPaths = require('vinyl-paths');
const docjs = require('documentation');
const REGEX_FILE_NAME = /((\w)+(-)*(\w))+(?=.js)/g;

function createDocForFile(filename) {
const splittedName = filename.split('/');
const filenameWithoutExt = filename.match(REGEX_FILE_NAME)[0];

return docjs.build([filename], {shallow: true})
.then(result => docjs.formats.md(result, {}))
.then(output => ({
file: filenameWithoutExt,
// get the parent folder of file
folder: filenameWithoutExt !== 'index' ? splittedName[splittedName.length - 2] : 'index',
markdown: output
}));
}

// deletes all files in the output path
gulp.task('clean-docs', () =>
gulp.src([`${paths.docsOutput}`])
gulp.src([`${paths.apiDoc}`])
.pipe(vinylPaths(del))
);

gulp.task('build-jsdoc-to-md', () => {
const files = glob.sync(paths.source); // glob allows pattern matching for filenames
const regexFileName = /((\w)+(\-)*(\w))+(?=.js)/g;
const createdMdDocs = [];
files
.filter(filename => {
const name = filename.match(regexFileName)[0];
return name !== 'imports';
})
.map(filename => {
const splittedName = filename.split('/');
const filenameWithoutExt = filename.match(regexFileName)[0];
const jsDocObj = docjs.buildSync([filename], {shallow: true});
return docjs.formats.md(jsDocObj, {}, (err, output) => {
createdMdDocs.push({
file: filenameWithoutExt,
folder: filenameWithoutExt !== 'index' ? splittedName[splittedName.length - 2] : '', // get the parent folder of file
markdown: output
});
});
});
const writeMdFiles = createdMdDocs.map(mdDoc => {
const folder = `${paths.docsOutput}${mdDoc.folder}`;
const filePath = mdDoc.file !== 'index' ? `${paths.docsOutput}${mdDoc.folder}/${mdDoc.file}.md` : `${paths.docsOutput}${mdDoc.file}.md`;
if (!fs.existsSync(folder)) {
fs.mkdirSync(folder);
}
return fs.writeFile(filePath, mdDoc.markdown);
});
return Promise.all(writeMdFiles);
gulp.task('build-jsdoc-to-md', done => {
Promise.resolve(glob.sync(paths.source))
// Filter file names to match tag name pattern
.then(fileNames => fileNames.filter(fileName => {
const name = fileName.match(REGEX_FILE_NAME)[0];
return name !== 'imports' && name !== 'index';
}))
// Generate markdown for each file
.then(fileNames =>
Promise.all(fileNames.map(createDocForFile))
)
// Group the markdown docs by there folder
.then(docs => docs.reduce((groups, doc) => {
groups[doc.folder] = groups[doc.folder] || [];
groups[doc.folder].push(doc);
return groups;
}, {}))
// Create markdown files for each folder
.then(groups => Object.keys(groups).forEach(folderName => {
const group = groups[folderName];
const fileName = `${paths.apiDoc}/${folderName}.md`;
const normalize = doc => doc.markdown.replace(/<!--.*?-->\n*/g, '');
const content = `# ${folderName}\n${group.map(normalize).join('')}`;
if (!fs.existsSync(paths.apiDoc)) {
fs.mkdirSync(paths.apiDoc);
}
fs.writeFileSync(fileName, content);
}))
.then(done);
});

gulp.task('generate-docs', done => runSequence('clean-docs', 'build-jsdoc-to-md', done));
38 changes: 31 additions & 7 deletions build/tasks/lint.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
var gulp = require('gulp');
var paths = require('../paths');
var eslint = require('gulp-eslint');
const gulp = require('gulp');
const paths = require('../paths');
const eslint = require('gulp-eslint');
const runSequence = require('run-sequence');
const glob = require('glob');
const docjs = require('documentation');
const REGEX_FILE_NAME = /((\w)+(-)*(\w))+(?=.js)/g;

// runs eslint on all .js files
gulp.task('lint', function() {
return gulp.src([paths.source, paths.tests])
gulp.task('eslint', () =>
gulp.src([paths.source, paths.tests])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
.pipe(eslint.failOnError())
);

gulp.task('doc-lint', () =>
Promise.resolve(glob.sync(paths.source))
// Filter file names to match tag name pattern
.then(fileNames => fileNames.filter(fileName => {
const name = fileName.match(REGEX_FILE_NAME)[0];
return name !== 'imports';
}))
// Generate markdown for each file
.then(fileNames => fileNames.map(fileName =>
docjs.lint(fileName, {}).then(lintOutput => {
console.log(lintOutput);
})
))
.then(promises => Promise.all(promises))
);

gulp.task('lint', done =>
runSequence(['eslint', 'doc-lint'], done)
);
83 changes: 57 additions & 26 deletions build/tasks/prepare-release.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,71 @@
var gulp = require('gulp');
var runSequence = require('run-sequence');
var paths = require('../paths');
var changelog = require('conventional-changelog');
var fs = require('fs');
var bump = require('gulp-bump');
var args = require('../args');
const gulp = require('gulp');
const runSequence = require('run-sequence');
const paths = require('../paths');
const conventionalChangelog = require('gulp-conventional-changelog');
const conventionalGitHubReleaser = require('conventional-github-releaser');
const bump = require('gulp-bump');
const args = require('../args');
const changelogOpts = {
preset: 'angular',
releaseCount: 1,
targetCommitish: args.branch
};

// utilizes the bump plugin to bump the
// semver for the repo
gulp.task('bump-version', function() {
return gulp.src(['./package.json'])
.pipe(bump({type: args.bump})) //major|minor|patch|prerelease
.pipe(gulp.dest('./'));
});
gulp.task('bump-version', () =>
gulp.src(['./package.json'])
.pipe(bump({type: args.bump}))
.pipe(gulp.dest('./'))
);

// generates the CHANGELOG.md file based on commit
// from git commit messages
gulp.task('changelog', function(callback) {
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));

return changelog({
repository: pkg.repository.url,
version: pkg.version,
file: paths.doc + '/CHANGELOG.md'
}, function(err, log) {
fs.writeFileSync(paths.doc + '/CHANGELOG.md', log);
});
});
gulp.task('changelog', () =>
gulp.src(`${paths.doc}/CHANGELOG.md`)
.pipe(conventionalChangelog(changelogOpts))
.pipe(gulp.dest(paths.doc))
);

// calls the listed sequence of tasks in order
gulp.task('prepare-release', function(callback) {
return runSequence(
gulp.task('prepare-release', callback =>
runSequence(
'build',
'lint',
'bump-version',
'changelog',
callback
);
)
);

gulp.task('release', callback => {
conventionalGitHubReleaser({
type: 'oauth',
token: args.token || process.env.CONVENTIONAL_GITHUB_RELEASER_TOKEN
}, changelogOpts, {}, {}, {}, {}, (err, data) => {
if (err) {
console.error(err.toString());
return callback();
}

if (!data.length) {
console.log('No GitHub releases created because no git tags available to work with.');
return callback();
}

let allRejected = true;
for (let i = data.length - 1; i >= 0; i--) {
if (data[i].state === 'fulfilled') {
allRejected = false;
break;
}
}

if (allRejected) {
console.error(data);
} else {
console.log(data);
}
return callback();
});
});
26 changes: 21 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ machine:

general:
artifacts:
- "styleguide/index.html"
- "styleguide/scripts"
- "styleguide/src/style/assets"
- "styleguide/index.html"
- "styleguide/scripts"
- "styleguide/src/style/assets"
branches:
ignore:
- gh-pages

checkout:
post:
- git pull origin ${CIRCLE_BRANCH}
- git clone [email protected]:wholesale-design-system/styleguide.git
- git config --global user.email circleci@circleci
- git config --global user.email [email protected]
- git config --global user.name "${CIRCLE_PROJECT_USERNAME}"

dependencies:
pre:
- sudo apt-get update; sudo apt-get install jq
override:
- npm install -g gulp-cli aurelia-cli
- npm install
Expand All @@ -38,7 +41,20 @@ test:
- gulp test

deployment:
master:
release:
branch: [master, release]
commands:
- gulp generate-docs bump-version changelog
- git add package.json doc dist
- git commit -m "Bumped version to $(jq -r .version package.json) [skip ci]"
- git tag -f -a $(jq -r .version package.json) -m "Automatic release via CircleCI"
- git push origin $CIRCLE_BRANCH
- gulp release --branch="${CIRCLE_BRANCH}"
- au build:
pwd: styleguide
- au publish --commit ${CIRCLE_SHA1} --repo "${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}" --target "${TARGET}":
pwd: styleguide
styleguide:
branch: /.*/
commands:
- au build:
Expand Down
Loading