mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-31 17:51:46 +02:00
Merge branch 'develop' into center-storybook-components
This commit is contained in:
126
package-lock.json
generated
126
package-lock.json
generated
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "nes.css",
|
||||
"version": "0.0.0-development",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
"version": "7.0.0",
|
||||
@@ -1124,6 +1123,59 @@
|
||||
"integrity": "sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==",
|
||||
"dev": true
|
||||
},
|
||||
"@semantic-release/exec": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-3.3.0.tgz",
|
||||
"integrity": "sha512-6a5nMGLyYJUl5me4orEIA89mf1Roz1jEVlv0GgIJv1k/yjEcmWicYQ76PrPfUzh81sVtfHfK0zLN5Vikz8f5oA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@semantic-release/error": "^2.1.0",
|
||||
"aggregate-error": "^1.0.0",
|
||||
"debug": "^4.0.0",
|
||||
"execa": "^1.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"parse-json": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"execa": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@storybook/addon-knobs": {
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@storybook/addon-knobs/-/addon-knobs-4.0.12.tgz",
|
||||
@@ -4332,7 +4384,7 @@
|
||||
"dependencies": {
|
||||
"domelementtype": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
||||
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
|
||||
"dev": true
|
||||
}
|
||||
@@ -5092,7 +5144,7 @@
|
||||
},
|
||||
"expand-range": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
||||
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -6456,7 +6508,7 @@
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -6532,6 +6584,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"git-rev-sync": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/git-rev-sync/-/git-rev-sync-1.12.0.tgz",
|
||||
"integrity": "sha1-RGhAbH5sO6TPRYeZnhrbKNnRr1U=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"graceful-fs": "4.1.11",
|
||||
"shelljs": "0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"graceful-fs": {
|
||||
"version": "4.1.11",
|
||||
"resolved": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
||||
"dev": true
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.7.7",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.7.tgz",
|
||||
"integrity": "sha1-svXHfvlxSPS09uImguELuoZnz/E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
@@ -6660,7 +6742,7 @@
|
||||
},
|
||||
"globby": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/globby/-/globby-8.0.1.tgz",
|
||||
"integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -7930,7 +8012,7 @@
|
||||
},
|
||||
"jest-get-type": {
|
||||
"version": "22.4.3",
|
||||
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
|
||||
"integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
|
||||
"dev": true
|
||||
},
|
||||
@@ -9092,7 +9174,7 @@
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
|
||||
"dev": true
|
||||
}
|
||||
@@ -12809,7 +12891,7 @@
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -12834,7 +12916,7 @@
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -12871,7 +12953,7 @@
|
||||
},
|
||||
"p-is-promise": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
|
||||
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -13056,7 +13138,7 @@
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -13873,7 +13955,7 @@
|
||||
},
|
||||
"pretty-hrtime": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
|
||||
"integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -14496,7 +14578,7 @@
|
||||
"dependencies": {
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
@@ -15038,7 +15120,7 @@
|
||||
},
|
||||
"safe-regex": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
||||
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -15110,7 +15192,7 @@
|
||||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||
"resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -16313,7 +16395,7 @@
|
||||
},
|
||||
"staged-git-files": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.1.tgz",
|
||||
"integrity": "sha512-H89UNKr1rQJvI1c/PIR3kiAMBV23yvR7LItZiV74HWZwzt7f3YHuujJ9nJZlt58WlFox7XQsOahexwk7nTe69A==",
|
||||
"dev": true
|
||||
},
|
||||
@@ -16462,7 +16544,7 @@
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -16494,7 +16576,7 @@
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -16509,7 +16591,7 @@
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
|
||||
"dev": true
|
||||
},
|
||||
@@ -16709,7 +16791,7 @@
|
||||
},
|
||||
"stylelint-order": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-0.8.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/stylelint-order/-/stylelint-order-0.8.1.tgz",
|
||||
"integrity": "sha512-8mp1P2wnI9XShYXVXDsxVigE2eXnc0C2O4ktbwUvTBwjCP4xZskIbUVxp1evSG3OK4R7hXVNl/2BnJCZkrcc/w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -16913,7 +16995,7 @@
|
||||
},
|
||||
"tar": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
||||
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
16
package.json
16
package.json
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"name": "nes.css",
|
||||
"version": "0.0.0-development",
|
||||
"description": "NES.css is NES-style CSS Framework.",
|
||||
"scripts": {
|
||||
"watch": "npm run build:sass -- --watch",
|
||||
@@ -8,7 +7,7 @@
|
||||
"stylelint": "stylelint scss/**/*.scss",
|
||||
"build:stylelint": "npm run stylelint -- --fix",
|
||||
"build:clean": "rimraf css",
|
||||
"build:sass": "node-sass --output-style expanded --source-map true scss/nes.scss css/nes.css",
|
||||
"build:sass": "node-sass --output-style expanded --source-map true --functions scripts/scssFunctions.js scss/nes.scss css/nes.css",
|
||||
"build:autoprefix": "postcss --use autoprefixer --map false --output css/nes.css css/nes.css",
|
||||
"build:cleancss": "cleancss -o css/nes.min.css css/nes.css",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
@@ -38,6 +37,7 @@
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^7.2.1",
|
||||
"@commitlint/config-conventional": "^7.1.2",
|
||||
"@semantic-release/exec": "^3.3.0",
|
||||
"@storybook/addon-knobs": "^4.0.11",
|
||||
"@storybook/html": "^4.0.11",
|
||||
"autoprefixer": "^9.1.5",
|
||||
@@ -50,6 +50,7 @@
|
||||
"eslint-config-airbnb-base": "^13.1.0",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"file-loader": "^2.0.0",
|
||||
"git-rev-sync": "^1.12.0",
|
||||
"husky": "^1.0.0",
|
||||
"lint-staged": "^7.3.0",
|
||||
"node-sass": "^4.9.3",
|
||||
@@ -105,6 +106,17 @@
|
||||
"prettier": {
|
||||
"printWidth": 100
|
||||
},
|
||||
"release": {
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/npm",
|
||||
"@semantic-release/github",
|
||||
["@semantic-release/exec", {
|
||||
"prepareCmd": "./scripts/update-version ${nextRelease.version}"
|
||||
}]
|
||||
]
|
||||
},
|
||||
"stylelint": {
|
||||
"plugins": [
|
||||
"stylelint-scss",
|
||||
|
24
scripts/getBuildData.js
Normal file
24
scripts/getBuildData.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const git = require('git-rev-sync'); /* eslint-disable-line import/no-extraneous-dependencies */
|
||||
|
||||
module.exports = (isCompiled = false) => {
|
||||
let buildData = '';
|
||||
|
||||
if (git.branch() !== 'master') {
|
||||
if (isCompiled) {
|
||||
buildData += `
|
||||
Build Date: ${(new Date()).toISOString()}
|
||||
Node Version: ${process.version}`;
|
||||
}
|
||||
|
||||
buildData += `
|
||||
Branch: ${git.branch()}
|
||||
Commit: ${git.long()}`;
|
||||
|
||||
if (process.env.CIRCLECI) {
|
||||
buildData += `
|
||||
Build Number (CircleCI): ${process.env.CIRCLE_BUILD_NUM}`;
|
||||
}
|
||||
}
|
||||
|
||||
return buildData.replace(/^ +/gm, ' ');
|
||||
};
|
7
scripts/scssFunctions.js
Normal file
7
scripts/scssFunctions.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const { types } = require('node-sass'); /* eslint-disable-line import/no-extraneous-dependencies */
|
||||
|
||||
const getBuildData = require('./getBuildData');
|
||||
|
||||
module.exports = {
|
||||
'build-data()': () => types.String(getBuildData(true)),
|
||||
};
|
29
scripts/updatePackageHeader.js
Executable file
29
scripts/updatePackageHeader.js
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const getBuildData = require('./getBuildData');
|
||||
|
||||
const nextVersion = process.argv[2];
|
||||
|
||||
if (!nextVersion) {
|
||||
throw new Error('This script requires a version number to be provided');
|
||||
}
|
||||
|
||||
// Update the SCSS Package Header
|
||||
const SCSSFilePath = path.resolve('scss', 'nes.scss');
|
||||
let SCSSFile = fs.readFileSync(SCSSFilePath, 'utf8');
|
||||
|
||||
SCSSFile = SCSSFile.replace(/^ {2}Version: development/m, ` Version: ${nextVersion}`);
|
||||
SCSSFile = SCSSFile.replace(/^#{build-data\(\)}/m, getBuildData());
|
||||
|
||||
fs.writeFileSync(SCSSFilePath, SCSSFile, 'utf8');
|
||||
|
||||
// Update the SCSS Package Header
|
||||
const CSSFilePath = path.resolve('css', 'nes.css');
|
||||
let CSSFile = fs.readFileSync(CSSFilePath, 'utf8');
|
||||
|
||||
CSSFile = CSSFile.replace(/^ {2}Version: development/m, ` Version: ${nextVersion}`);
|
||||
|
||||
fs.writeFileSync(CSSFilePath, CSSFile, 'utf8');
|
@@ -1,8 +1,10 @@
|
||||
@charset "utf-8";
|
||||
|
||||
/*!
|
||||
* NES.css v0.0.2(alpha)
|
||||
*/
|
||||
/*!***************************************************************************\
|
||||
NES.css Framework
|
||||
Version: development
|
||||
#{build-data()}
|
||||
\*****************************************************************************/
|
||||
|
||||
@import "base/_index.scss";
|
||||
@import "utilities/_index.scss";
|
||||
|
Reference in New Issue
Block a user