Git Product home page Git Product logo

mjml-starter-kit's Introduction

MJML starter kit

This is a stater-kit for MJML.

Features

  • Easy MJML files compilation (npm run build to compile every templates)
  • Easy dev mode with browser reloading and file watching, even with custom components (npm start)
  • Contains the examples of the documentation

Usage

Installation

The only thing you need is NodeJS / NPM, then:

npm install

Build templates to HTML

npm run build

This will create the HTML files in the dist folder. Reading from templates folder.

Dev mode

npm start

This will start a development server with a watch task and browser reloading.

Create your own component

npm run init-component mycomponent

This will create a js file in the root folder. You need to move it to the components folder and add it to the components/index.js file. Then you will be able to use it in your templates as <mj-mycomponent/>.

Folder structure

.
├── components      -> Custom components
├── dist            -> Build folder with final HTML files
└── templates       -> MJML files

Contribute

Pull requests and suggestions are welcome!

License

The MIT License (MIT)

Copyright (c) 2016 Emmanuel Payet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

mjml-starter-kit's People

Contributors

epayet avatar ocowchun avatar sozedk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mjml-starter-kit's Issues

Did run "npm install" with only node installed

Hi,
just found your repo and am super happy, because it seems to spare me a lot of work :)

Sadly I can't get it working :(
I have only node installed globally and did run npm install
After everything runs thorugh I run npm start but I get

➜  marketo-email-template git:(master) ✗ npm start

> [email protected] start /Users/fabianhenzler/Sites/marketo-email-template
> gulp

/Users/fabianhenzler/Sites/marketo-email-template/components/index.js:5
export default CustomElements;
^^^^^^
SyntaxError: Unexpected token export
    at Object.exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:543:28)
    at loader (/Users/fabianhenzler/Sites/marketo-email-template/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/fabianhenzler/Sites/marketo-email-template/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/fabianhenzler/Sites/marketo-email-template/gulpfile.js:4:1)

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/7.5.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the marketo-email-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs marketo-email-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls marketo-email-template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fabianhenzler/Sites/marketo-email-template/npm-debug.log

npm-debug.log

23 error If you do, this is most likely a problem with the marketo-email-template package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     gulp
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs marketo-email-template
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls marketo-email-template
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Can you help? :)
Do I need to install something globally like browsersync?
Sorry have been out of dev for a year now and back to noob status ;)

Thanks in advance for your support :)

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.