Giter VIP home page Giter VIP logo

cli's Introduction

Maizzle Starter

Quickly build HTML emails with Tailwind CSS

Version Build Downloads License

Getting Started

Run this command and follow the prompts:

npx create-maizzle

Documentation

Maizzle documentation is available at https://maizzle.com

Issues

Please open all issues in the framework repository.

License

The Maizzle framework is open-sourced software licensed under the MIT license.

cli's People

Contributors

cossssmin avatar dependabot-preview[bot] avatar dependabot[bot] avatar dzcpy avatar hahlh avatar joshmanders 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

Watchers

 avatar  avatar

cli's Issues

`new [repo url]` command fails when missing folder parameter

Description:

maizzle new [repo url] fails if you don't specify the name of the folder it should create.

Steps To Reproduce:

maizzle new https://github.com/maizzle/starter-litmus.git

Result

 cd: starter-litmus: No such file or directory

Expected result:

Repo to be cloned into starter-litmus folder and dependencies installed.

Temporary fix

Specify the folder name before the Git repository:

maizzle new starter-litmus https://github.com/maizzle/starter-litmus.git

maizzle cli fails when using es modules

Hi there! Thanks for all the effort on maizzle!

maizzle cli fails when "type": "module" is being used in package.json.

Example package.json:

{
  "private": true,
  "type": "module",
  "scripts": {
    "start": "maizzle serve"
  },
  "dependencies": {
    "@maizzle/framework": "latest"
  }
}
$ npm start
/xxxx/node_modules/@maizzle/framework/src/generators/config.js:26
        throw new Error(`could not load config.${env}.js`)
    Error: could not load config.production.js
    at Object.getMerged (/xxxx/node_modules/@maizzle/framework/src/generators/config.js:26:15)
    at Object.serve (/xxxx/node_modules/@maizzle/framework/src/commands/serve.js:24:18)
    at Command.<anonymous> (/xxxx/node_modules/@maizzle/cli/src/index.js:75:24)
    at Command.listener [as _actionHandler] (/xxxx/node_modules/commander/lib/command.js:482:17)
    at /xxxx/node_modules/commander/lib/command.js:1265:65
    at Command._chainOrCall (/xxxx/node_modules/commander/lib/command.js:1159:12)
    at Command._parseCommand (/xxxx/node_modules/commander/lib/command.js:1265:27)
    at /xxxx/node_modules/commander/lib/command.js:1063:27
    at Command._chainOrCall (/xxxx/node_modules/commander/lib/command.js:1159:12)
    at Command._dispatchSubcommand (/xxxx/node_modules/commander/lib/command.js:1059:23)

Does not run on macOS

Using version 1.5.7.

The script in node_modules/.bin/maizzle has CRLF line endings and so on macOS it fails with:

[127] jason@goodness> ./node_modules/.bin/maizzle build twirl                                                                         ~/src/goodcover/marketing/templating
env: node\r: No such file or directory

Exposing rendering output to string/single file via CLI

Hi there,

I'm working on integrating Maizzle into a Rails app a la https://github.com/sighmon/mjml-rails and I think it would be useful to be able to build a template individually as a string (and be able to specify text vs. html), rather than the whole project.

Is that something you'd be willing to support through the CLI? I see that there's an Output.toString which seems like it would work for what I'm trying to accomplish, but I could very well be going in the wrong direction. Happy to take another approach if you've got any ideas!

Thanks!

Unable to use maizzle commands.

Steps:
1.-
npm install -g @maizzle/cli
2.-
maizzle new
After this command I get this.
maizzle: command not found

It's been working fine before on another computer but not anymore.

updateNotifier breaking `maizzle build` (--bin, monorepo)

  • @maizzle/framework: 4.4.4
  • Node.js Version: 16.13.0

After running maizzle build en --bin ../../../node_modules/@maizzle/framework/src

โœ” Built 2 templates in 0.229s
node:internal/modules/cjs/loader:933
  const err = new Error(message);
              ^

Error: Cannot find module './node_modules/@maizzle/framework/package.json'
Require stack:
- /Users/.../libs/web/email/noop.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at resolveFileName (/Users/.../node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/Users/.../node_modules/resolve-from/index.js:43:9)
    at module.exports (/Users/.../node_modules/resolve-from/index.js:46:47)
    at module.exports (/Users/.../node_modules/import-from/index.js:4:55)
    at module.exports (/Users/.../node_modules/import-cwd/index.js:4:30)
    at Command.<anonymous> (/Users/.../node_modules/@maizzle/framework/node_modules/@maizzle/cli/src/index.js:52:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/.../libs/web/email/noop.js' ]
}

I've looked into maizzle/framework#974 and #198 but doesn't managed to get it to work. I have only installed @maizzle/framework.

I am using Nx monorepo.

Unable to run maizzle serve (cannot find module 'bootstrap')

I am trying to run Maizzle for local dev, but I am unable to. Node version is 12.16.3

Error:

olafg@Olafs-MacBook-Pro maizzle % maizzle serve           
/Users/olafg/.config/yarn/global/node_modules/@maizzle/cli/src/index.js:32
        throw err
        ^

Error: Cannot find module './bootstrap'
Require stack:
- /Users/olafg/dev/rem/maizzle/noop.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at resolveFileName (/Users/olafg/.config/yarn/global/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/Users/olafg/.config/yarn/global/node_modules/resolve-from/index.js:43:9)
    at module.exports (/Users/olafg/.config/yarn/global/node_modules/resolve-from/index.js:46:47)
    at module.exports (/Users/olafg/.config/yarn/global/node_modules/import-from/index.js:4:55)
    at module.exports (/Users/olafg/.config/yarn/global/node_modules/import-cwd/index.js:4:30)
    at Command.<anonymous> (/Users/olafg/.config/yarn/global/node_modules/@maizzle/cli/src/index.js:29:25)
    at Command.listener (/Users/olafg/.config/yarn/global/node_modules/commander/index.js:370:29)
    at Command.emit (events.js:310:20)
    at Command.parseArgs (/Users/olafg/.config/yarn/global/node_modules/commander/index.js:892:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/olafg/dev/rem/maizzle/noop.js' ]
}

Git clone with the github url twice

During the maizzle new https://github.com/maizzle/starter-amp4email.git command, the gitrepository is being cloned, but this clone command has the given github url twice:

git clone https://github.com/maizzle/starter-amp4email.git https://github.com/maizzle/starter-amp4email.git --single-branch

One must be deleted, so that the clone is going right.

Here a screenshot of the command execution
Schermafbeelding 2020-04-28 om 21 10 33

Incompatibiliy with monorepo

Hello,

I'm trying to work with maizzle framework in a monorepo structure built with @lerna, and when trying to build the project completely the cli is throwing an error. This is because in monorepos, node_modules are symlinked to root folder, and the cli is not following the symlink.

The action line is breaking my build

  cli
    .command('build [env]')
    .description('compile email templates and output them to disk')
    .action(env => importCwd('./node_modules/@maizzle/framework/src').build(env))

Updated notifier breaks `maizzle build` in monorepos.

I've had no issues before but haven't updated in a while, being as we're still on v4 I just wholesale updated from 4.0.2 to 4.4.4 and now maizzle build --bin .... breaks because updateNotifier doesn't take the --bin flag into consideration, it still looks for ./node_modules which doesn't exist in many monorepos.

Looks like this issue was brought in here: 847d7f3

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.