Git Product home page Git Product logo

alps-gutenberg-blocks's Introduction

ALPS Gutenberg Plugin

This plugin is created to support the ALPS for Wordpress, to provide Gutenberg Blocks with ALPS markup.


This project is based on Create Guten Block.

Local development

๐Ÿ‘‰ Init

On first run of the plugin locally you should install required dependencies

npm install
composer install

Composer could be downloaded from https://getcomposer.org/

Link to the WP installation

You should link the build/alps-gutenberg-blocks into wp-content/plugins of the local WP.

ln -s path/to/plugin/ path/to/wp/wp-content/plugins/alps-gutenberg-blocks

The alps-gutenbers-blocks directory should appear in wp-content/plugins.

๐Ÿ‘‰ npm run dev

  • Use to compile and run the blocks in development mode.
  • Watches for any changes and reports back any errors in your code.

๐Ÿ‘‰ npm run project:build-blocks

  • Use to build production code for your blocks inside dist folder.
  • Runs once and reports back the gzip file sizes of the produced code.

๐Ÿ‘‰ npm run project:set-version

  • Use to sync the current version in code with CHANGELOG.md
  • Sets the plugin version in package.json, plugin.php, commits the changes and creates a related git tag.
  • Push result to the GitHub to run the build and release processes.

i18n

๐Ÿ‘‰ npm run i18n:update-pot

  • Use to generate master file for internationalization.
  • Scans the project files for localizable strings and dumps them to the languages/alps-gutenberg-blocks.pot
  • Open alps-gutenberg-blocks.pot with POEdit to create new and update existing locale files with string translations.
  • Translation files should be named as languages/alps-gutenberg-blocks-{lang_LANG}.po
  • Set language code in en_US format.

๐Ÿ‘‰ npm run i18n:create-json

  • Use to convert .po files to .json
  • Iterates over each .po file in languages and generates .json file with strings.
  • .po file names should be like alps-gutenberg-blocks-en_US.po
  • .json files are used for js scripts.

Plugin release

๐Ÿ‘‰ npm run wp:plugin:build

  • Use on Continuous Integration server to create a plugin archive for distribution
  • Builds plugin artifacts in build directory
  • alps-gutenberg-blocks directory with plugin files
  • alps-gutenberg-blocks.zip โ€“ plugin distribution archive
  • alps-gutenberg-blocks.json โ€“ plugin metadata for Wordpress updates

๐Ÿ‘‰ npm run wp:plugin:release

  • Use on Continuous Integration server to publish the new version
  • Uploads alps-gutenberg-blocks.zip and alps-gutenberg-blocks.json to CDN
  • Creates GitHub release for manual installation

CI Config

Build script uses Environment Variables to get the config

Var Description Example
CDN_HOST SSH host some.server.com
CDN_USER SSH user username
CDN_PRIVATE_KEY SSH private key content (multiline)
CDN_PRIVATE_KEY_PASS SSH private key passphrase
CDN_ROOT_PATH Path on server for artifacts uploading /var/www

alps-gutenberg-blocks's People

Contributors

bertobox avatar betsyandrew avatar bgunio3 avatar davideleuterius avatar dependabot[bot] avatar designerbrent avatar johnrbeckett avatar kelscahill avatar sergsadovyi avatar yauhenikapliarchuk 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.