2015-07-23 13:55:49 +02:00
2015-07-23 13:52:24 +02:00
2015-07-09 23:04:41 +02:00
2015-07-23 13:55:49 +02:00
2015-07-21 18:20:38 +02:00
2015-07-14 18:18:34 +02:00
2015-07-21 18:20:38 +02:00
2015-07-21 18:20:38 +02:00
2015-07-17 22:43:22 +02:00
2015-07-09 23:04:41 +02:00
2015-07-09 23:04:41 +02:00
2015-07-23 13:46:23 +02:00
2015-07-09 23:04:41 +02:00
2015-07-09 23:04:41 +02:00

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.

$ ./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
I refuse to pay money to send emails from my own damn email server.
Readme 368 MiB
5.12.4-pirate Latest
2025-06-03 02:30:47 +00:00
Languages
PHP 73.2%
TypeScript 12.8%
JavaScript 7.7%
SCSS 2.5%
HTML 2%
Other 1.7%