Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into genero
Browse files Browse the repository at this point in the history
* upstream/master:
  Don't need this any more! :(
  This moves our eslint config in .eslint.js, which allows us to use conditionals in the config file itself, significantly simpliying rule creation. For small-scale differences, this seems to be the simplest solution.
  Rename production eslint file from `.eslintrcProd` to `.eslint.production.json` as per suggestion from @swalkinshaw: roots#2008 (comment)
  Build process now allows console.log, except when the `production` flag is set on `yarn build`, in which case it will throw an error.
  Delete .eslintrc
  Remove some Bower traces
  Update README.md
  Add Code of Conduct [ci skip]
  Change .dev to .test for default local dev TLD per roots/trellis#923
  Bootstrap function in _variables.scss to play nice with other frameworks
  Move variables and Bootstrap imports to autoload
  Remove explicit Bootstrap lines
  Example $theme-color
  Update main.scss
  Update controller examples
  Update dependencies
  Update CHANGELOG [ci skip]
  Bootstrap 4 Beta 2
  Remove get_the_posts_navigation from 404
  • Loading branch information
oxyc committed Jan 8, 2018
2 parents eb23663 + 42db9f9 commit 5854b11
Show file tree
Hide file tree
Showing 9 changed files with 828 additions and 446 deletions.
62 changes: 62 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
"root": true,
"extends": "eslint:recommended",
"globals": {
"wp": true,
"Foundation": true
},
"env": {
"node": true,
"es6": true,
"amd": true,
"browser": true,
"jquery": true
},
"parserOptions": {
"ecmaFeatures": {
"globalReturn": true,
"generators": false,
"objectLiteralDuplicateProperties": false,
"experimentalObjectRestSpread": true
},
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": [
"import"
],
"settings": {
"import/core-modules": [],
"import/ignore": [
"node_modules",
"\\.(coffee|scss|css|less|hbs|svg|json)$"
]
},
"rules": {
"no-console": process.env.NODE_ENV === 'production' ? 2 : 0,
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
],
"new-cap": [
"error",
{
"newIsCap": true,
"newIsCapExceptions": [],
"capIsNew": false,
"capIsNewExceptions": [
"Immutable.Map",
"Immutable.Set",
"Immutable.List"
],
"properties": false
}
]
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
.cache-loader
dist
bower_components
node_modules
npm-debug.log
yarn-error.log
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### HEAD
* Update to Bootstrap 4 Beta 2 ([#1981](https://github.com/roots/sage/pull/1981))
* Add friendly-errors-webpack-plugin ([#1961](https://github.com/roots/sage/pull/1961))
* Update to Controller 9.0.0-beta.4 ([#1959](https://github.com/roots/sage/pull/1959))
* Change default Controller path to `app/controllers/` ([#1954](https://github.com/roots/sage/pull/1954))
* Fix `lint:styles` task with cmd.exe ([#1955](https://github.com/roots/sage/pull/1955))
* Ensure template filenames are without path and extension ([#1941](https://github.com/roots/sage/pull/1941))
* Moved `title()` helper to `app.php` controller ([#1912](https://github.com/roots/sage/pull/1912))
* Fix `lint:styles` script not matching files in deep subdirectories ([#1951](https://github.com/roots/sage/pull/1951))
* Fix for plugins that don't enqueue their scripts properly ([#1949](https://github.com/roots/sage/pull/1949))
* Fix Popper for Bootstrap 4 ([#1946](https://github.com/roots/sage/pull/1946))

### 9.0.0-beta.4: August 11th, 2017
* Update to Bootstrap 4.0.0-beta ([#1943](https://github.com/roots/sage/pull/1943))
* PHP 7+ is now required ([#1935](https://github.com/roots/sage/pull/1935))
Expand Down
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $ composer create-project roots/sage your-theme-name dev-master
During theme installation you will have the options to:

* Update theme headers (theme name, description, author, etc.)
* Select a CSS framework (Bootstrap, Foundation, Tachyons, none)
* Select a CSS framework (Bootstrap, Bulma, Foundation, Tachyons, none)
* Add Font Awesome
* Configure Browsersync (path to theme, local development URL)

Expand Down
116 changes: 38 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,75 +23,35 @@
"Android >= 4.4",
"ios >= 8"
],
"eslintConfig": {
"root": true,
"extends": "eslint:recommended",
"globals": {
"wp": true,
"Foundation": true
},
"env": {
"node": true,
"es6": true,
"amd": true,
"browser": true,
"jquery": true
},
"parserOptions": {
"ecmaFeatures": {
"globalReturn": true,
"generators": false,
"objectLiteralDuplicateProperties": false,
"experimentalObjectRestSpread": true
},
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": [
"import"
],
"settings": {
"import/core-modules": [],
"import/ignore": [
"node_modules",
"\\.(coffee|scss|css|less|hbs|svg|json)$"
]
},
"rules": {
"no-console": "off",
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
],
"new-cap": [
"error",
{
"newIsCap": true,
"newIsCapExceptions": [],
"capIsNew": false,
"capIsNewExceptions": [
"Immutable.Map",
"Immutable.Set",
"Immutable.List"
],
"properties": false
}
]
}
},
"stylelint": {
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-scss"
],
"rules": {
"no-empty-source": null,
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"extend",
"at-root",
"debug",
"warn",
"error",
"if",
"else",
"for",
"each",
"while",
"mixin",
"include",
"content",
"return",
"function"
]
}
],
"at-rule-empty-line-before": [
"always",
{
Expand Down Expand Up @@ -148,16 +108,16 @@
"browsersync-webpack-plugin": "^0.6.0",
"bs-html-injector": "~3.0",
"buble-loader": "^0.4.1",
"cache-loader": "~1.0",
"cache-loader": "~1.1.0",
"clean-webpack-plugin": "^0.1.16",
"copy-globs-webpack-plugin": "^0.2.0",
"css-loader": "^0.28.4",
"cssnano": "~4.0.0-rc.1",
"eslint": "~4.2",
"cssnano": "~v4.0.0-rc.2",
"eslint": "~4.9.0",
"eslint-loader": "~1.9",
"eslint-plugin-import": "~2.7",
"eslint-plugin-import": "~2.8.0",
"extract-text-webpack-plugin": "~3.0",
"file-loader": "^0.11.2",
"file-loader": "^1.1.5",
"friendly-errors-webpack-plugin": "^1.6.1",
"imagemin-mozjpeg": "~6.0",
"imagemin-webpack-plugin": "~1.5.0-beta.0",
Expand All @@ -169,19 +129,19 @@
"rimraf": "~2.6",
"sage-fontello": "https://github.com/generoi/sage-fontello.git",
"sass-loader": "~6.0",
"style-loader": "^0.18.2",
"stylelint": "~7.12",
"stylelint-config-standard": "~16.0",
"stylelint-scss": "^1.4.4",
"stylelint-webpack-plugin": "^0.8.0",
"url-loader": "^0.5.9",
"webpack": "~3.3",
"webpack-assets-manifest": "^0.7.0",
"webpack-dev-middleware": "~1.11",
"webpack-hot-middleware": "~2.18",
"style-loader": "^0.19.0",
"stylelint": "^8.2.0",
"stylelint-config-standard": "~17.0.0",
"stylelint-scss": "^2.2.0",
"stylelint-webpack-plugin": "^0.9.0",
"url-loader": "^0.6.2",
"webpack": "~3.8.1",
"webpack-assets-manifest": "^1.0.0",
"webpack-dev-middleware": "~1.12.0",
"webpack-hot-middleware": "~2.20.0",
"webpack-merge": "~4.1",
"webpack-rsync-watcher": "https://github.com/generoi/webpack-rsync-watcher.git",
"yargs": "~8.0"
"yargs": "~9.0.1"
},
"dependencies": {
"babel-polyfill": "^6.23.0",
Expand Down
14 changes: 0 additions & 14 deletions resources/assets/build/.eslintrc

This file was deleted.

5 changes: 2 additions & 3 deletions resources/assets/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ let webpackConfig = {
},
{
test: /\.js$/,
exclude: [/(node_modules|bower_components)(?![/|\\](bootstrap|foundation-sites))/],
exclude: [/node_modules(?![/|\\](bootstrap|foundation-sites))/],
use: [
{ loader: 'cache' },
{ loader: 'buble', options: { objectAssign: 'Object.assign' } },
Expand Down Expand Up @@ -104,7 +104,7 @@ let webpackConfig = {
},
{
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
include: /node_modules|bower_components/,
include: /node_modules/,
loader: 'url',
options: {
limit: 4096,
Expand All @@ -118,7 +118,6 @@ let webpackConfig = {
modules: [
config.paths.assets,
'node_modules',
'bower_components',
],
enforceExtension: false,
},
Expand Down
Loading

0 comments on commit 5854b11

Please sign in to comment.