Coder Social home page Coder Social logo

cli-export-project's Introduction

@dojo/cli-export-project

Build Status codecov npm version

A command which exports a project bundle which can be used with the @dojo/web-editor and other tools.

WARNING This is alpha software. This is not yet production ready, so you should use at your own risk.

Features

This command will create a JSON file which will contain all the necessary information about the current code to be able to be loaded into the @dojo/web-editor. It is possible that it can be used with other tools which can read the custom format.

The types for the file are located in interfaces/project.json.d.ts with the interface for the main file being ProjectJson.

How do I use this package?

To create a project export:

$ dojo export project

Export project bundle
  exported to "my-project.project.json"

This will export a file ending in .project.json which will be named after the name of your package in the package.json file.

There are several options that can be passed on the command line:

Flag Type Description
-c, --content string A comma seperated list of extentions of files to include in the project files. Defaults to "ts,html,css,json,xml,md".
-o, --out string The output path for the generated bundle. Defaults to the current working directory.
-p, --project string The path to the root of the project to bunde. Defaults to the current working directory.
-v, --verbose flag Provide verbose output when generating the editor bundle.
-h, --help flag Show help

How do I contribute?

We appreciate your interest! Please see the Dojo 2 Meta Repository for the Contributing Guidelines.

Code Style

This repository uses prettier for code styling rules and formatting. A pre-commit hook is installed automatically and configured to run prettier against all staged files as per the configuration in the projects package.json.

An additional npm script to run prettier (with write set to true) against all src and test project files is available by running:

npm run prettier

Testing

Test cases MUST be written using Intern using the Object test interface and Assert assertion interface.

90% branch coverage MUST be provided for all code submitted to this repository, as reported by Istanbul’s combined coverage results for all supported platforms.

To test locally in node run:

grunt test

© 2017 JS Foundation & contributors. New BSD license.

cli-export-project's People

Contributors

agubler avatar bryanforbes avatar devpaul avatar kitsonk avatar nicknisi avatar rorticus avatar umaar avatar

Watchers

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

cli-export-project's Issues

Ability to set main module

Enhancement

Related to dojo/web-editor#4 we should have the ability to express the "main" module for running an application, like the index.html. This should default to project.json's main module but can be overridden with an argument.

Exporting static assets

Bug

The CLI export project does not handle exporting of static files like images. In particular the tutorials use some SVG images.

How to inline them into an application is another story... 😢

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.