GithubHelp home page GithubHelp logo

isabella232 / plugin-scaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 10up/plugin-scaffold

0.0 0.0 0.0 1.65 MB

10up official starter plugin.

License: GNU General Public License v2.0

PHP 55.46% JavaScript 38.79% CSS 5.75%

plugin-scaffold's Introduction

10up Plugin Scaffold

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.

Support Level GPL-2.0-or-later License

Dependencies

  1. Node >= 8.11 & NPM - Build packages and 3rd party dependencies are managed through NPM, so you will need that installed globally.
  2. Webpack - Webpack is used to process the JavaScript, CSS, and other assets.
  3. Composer - Composer is used to manage PHP.

Getting Started

Quick Start

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.

Direct Install

  • 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

Webpack config

Webpack config files can be found in config folder:

  • webpack.config.dev.js
  • webpack.config.common.js
  • webpack.config.prod.js
  • webpack.settings.js

In most cases webpack.settings.js is the main file which would change from project to project. For example adding or removing entry points for JS and CSS.

NPM Commands

  • npm run test (runs phpunit)
  • npm run start (install dependencies)
  • npm run watch (watch)
  • npm run build (build all files)
  • npm run build-release (build all files for release)
  • npm run dev (build all files for development)
  • npm run lint-release (install dependencies and run linting)
  • npm run lint-css (lint CSS)
  • npm run lint-js (lint JS)
  • npm run lint-php (lint PHP)
  • npm run lint (run all lints)
  • npm run format-js (format JS using eslint)
  • npm run format (alias for npm run format-js)
  • npm run test-a11y (run accessibility tests)

Composer Commands

composer lint (lint PHP files)

composer lint-fix (lint PHP files and automatically correct coding standard violations)

Contributing

We don't know everything! We welcome pull requests and spirited, but respectful, debates. Please contribute via pull requests on GitHub.

  1. Fork it!
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Added some great feature!'
  4. Push to the branch: git push origin feature/my-new-feature
  5. Submit a pull request

Learn more about the default packages used with this project

Frequently Asked Questions

A question that someone might have

An answer to that question.

WordPress Admin Dashboard

Support Level

Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

Like what you see?

Work with 10up, we create amazing websites and tools that make content management simple and fun using open source tools and platforms

plugin-scaffold's People

Contributors

aaemnnosttv avatar barryceelen avatar behzod avatar cmmarslender avatar colorful-tones avatar debabratakarfa avatar dependabot[bot] avatar firestorm980 avatar jaredrethman avatar jeffpaul avatar jodiwarren avatar joesnellpdx avatar jonathantneal avatar kopepasah avatar moraleida avatar nicholasio avatar s3rgiosan avatar saltcod avatar samikeijonen avatar smy315 avatar timwright12 avatar tlovett1 avatar tylercherpak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.