98cfbf02b2e1514b9d6efe80565562105f76992f
namp2
Not another MP2 a.k.a MP3 done the right way.
Install.
- Install system dependencies:
php
nodejs
phantomjs
-
Clone the repo in wp-content/plugins.
-
Install composer.
$ curl -sS https://getcomposer.org/installer | php
$ ./composer.phar install
- Install dependencies.
$ ./do install
- Update dependencies when needed.
$ ./do update
- Copy .env.sample to .env.
$ cp .env.sample .env
Structure.
- Dependencies.
# PHP dependencies.
composer.json
# JS dependencies.
package.json
-
/assets CSS and JS.
-
/lang Language files.
-
/lib MailPoet classes. All classes are autoloaded, under the MailPoet namespace.
// file: ./lib/models/subscriber.php
namespace \MailPoet\Models;
class Subscriber {}
$subscriber = new \MailPoet\Models\Subscriber();
-
/tests Acceptance and spec tests.
-
/mailpoet.php Kickstart file.
Tests.
- Unit tests (using verify):
$ ./do test:unit
- Acceptance tests:
# Setup .env
$ ./do test:acceptance
- Run all tests:
$ ./do test:all
Watch assets.
$ ./do watch
JS Dependencies.
In order to use a JS library (let's take Handlebars as an example), you need to follow these steps:
- add "handlebars" as a dependency in the
package.json
file
{
"private": true,
"dependencies": {
"handlebars": "3.0.3",
},
- run
./do install
(the handlebars module will be added into the node_modules folder) - create a symlink to the file you want to use by running this command
# from the root of the project
$ cd assets/js/lib/
# /!\ use relative path to the node_modules folder
$ ln -nsf ../../../node_modules/handlebars/dist/handlebars.min.js handlebars.min.js
- make sure to push the symlink onto the repository
Description
5.12.4-pirate
Latest
Languages
PHP
73.2%
TypeScript
12.8%
JavaScript
7.7%
SCSS
2.5%
HTML
2%
Other
1.7%