At 10up, we strive to provide digital products that yield a top-notch user experience. In order to improve both our efficiency and consistency, we need to standardize what we use and how we use it. This plugin scaffold allows us to share initial set up procedures to make sure all projects can get up and running as quickly as possible while closely adhering to 10up's high quality standards.
- Node & NPM - Build packages and 3rd party dependencies are managed through NPM, so you will need that installed globally
- Gulp - Gulp is used as the main task runner, it runs PostCSS, processes images, handles SVG sprites (if needed), and executes Webpack
- Webpack - Webpack is used to process the JavaScript
- Composer - Composer is used to manage PHP.
Install 10up's command line tool for scaffolding new projects. You can download it from the Project Scaffold repository. Setting up a new plugin is as easy as running create-10up plugin plugin-name-here
in the terminal!
Browsersync requires a local development URL. This is currently set in the package.json
, as proxyUrl
.
- Clone the repository
- Rename folder plugin-scaffold -> your project's name
- If copying files manually to an existing plugin directory instead of cloning directly from the repository, make sure to include the following files which may be hidden:
.babelrc
.browserslistrc
.editorconfig
.eslintignore
.eslintrc
.gitignore
The NPM commands will fail without these files present.
-
Do case-sensitive search/replace for the following:
- TenUpScaffold
- TENUP_SCAFFOLD
- tenup-scaffold
- tenup_scaffold
-
cd
into the plugin folder -
run
npm run start
to build the front-end assets
npm run start
(install dependencies and run initial gulp)
npm run watch
(watch)
npm run build
(build all front-end files)
npm run deploy
(build all front-end files for deploy)
composer lint
(lint PHP files)
composer lint-fix
(lint PHP files and automatically correct coding standard violations)
We don't know everything! We welcome pull requests and spirited, but respectful, debates. Please contribute via pull requests on GitHub.
- Fork it!
- Create your feature branch:
git checkout -b feature/my-new-feature
- Commit your changes:
git commit -am 'Added some great feature!'
- Push to the branch:
git push origin feature/my-new-feature
- Submit a pull request
- Babel core
- Babel eslint
- Babel loader
- Babel preset env
- Browserslist
- Browsersync
- Can I Use DB
- Del
- Eslint
- Eslint loader
- Gulp
- Gulp CSSNano
- Gulp filter
- Gulp PostCSS
- Gulp Rename
- Gulp Sourcemaps
- PostCSS CSSNext
- PostCSS Import
- Pump
- Require DIR
- Run Sequence
- Webpack
- Webpack CLI
- Webpack Stream
- Husky@next
- Lint Staged
- PHPCS