Coder Social home page Coder Social logo

mr-yuhuashi / art-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from art-software/art-core

4.0 1.0 1.0 20.39 MB

art framework core

TypeScript 71.97% JavaScript 9.22% CSS 0.53% HTML 8.15% Less 9.69% EJS 0.09% Shell 0.03% Handlebars 0.31%

art-core's Introduction

Art Framework

Art framework is a client side toolkit.

Art framework aims to provide you a ready to use client side project development enviorment, packages of art framework encapsulate complex details, do dirty works for you, keeping you focus on your own code development.

Introduction

Art framework is a toolkit containing a set of packages supporting different kinds client side application development.

  • Single Page Application (SPA)
  • Server Side Rendering (SSR) Appliction (TODO)
  • Tencent Wechat Miniprogram (Under development)

Art framework provides art cli tool helping developer easily scaffolding application, jumping into detailed application code development quickly, without worrying about code compiling, packaging, deployment.

Usage

Single Page Application (SPA)

  1. Prerequisite Local Enviorment
  1. Install art-cli-tool

    Install art-cli-tool globally with yarn:

    yarn global add art-cli-tool

    Or:

    Install art-cli-tool globally with npm:

    npm add art-cli-tool -g

    Check installed art-cli-tool version:

    art -v
    
  2. Make a new directory as project root

    For example:

    mkdir art-demo
    cd art-demo
  3. Scaffolding new project

    Art framework is frontend library agnostic, it's able to support most of common frontend libraries, like React, Vue, Angular and etc, with some easy extensions to art-webpack.

    Currently, Art framework SPA developemnt toolkit supports React + Typescript out of the box.

    art create project -s="react"
    

    Art cli tool will display several questions after you typed above command:

    • project name. Default is your directory name.

      It will be set as package.json name property.

    • project desc. Default is empty string.

      It will be set as package.json description property.

    • project virtual path. Default is empty string.

      Virtual path will be added to compiled code path.

      For example: module path is h5/home, project virtual path is app/react, the final compiled code will be stored at path app/react/h5/home.

    • module name. Default is empty string.

      The first module name. Supporting both single and multiple level module path. For example: home and campaign/201812/christmas.

    • What scaffold do you want to choice

      Select perferred scaffold type. Currently only react/h5 scaffold avaliable.

    After answering above questions, Art framework will automaticlly generate the initial ready to use project code.

  4. Install SPA related art packages

    With yarn:

    yarn add art-lib-common art-lib-react art-lib-utils art-server-mock art-webpack

    Or:

    With npm:

    npm install art-lib-common art-lib-react art-lib-utils art-server-mock art-webpack
  5. Server module

    After initial scaffold code generation, the first module is ready to write code.

    art serve -m "home"
  6. Configure art.config.js

    Replacing webpack.output.intePublicPath, webpack.output.prodPublicPath with actual integrate testing environment url and production environment url.

    Giving dll.version a meaningful version string, for example: '20190522_v1'.

  7. Generate dll file

    art dll

    If dll file has been generated before and no new changes done to dll config, there is no need to generate dll file again.

  8. Configure module template file

    For example, art.config.js projectVirtualPath is app/react and dll.version is 20190522_v1, module template file dll file path should be:

    <script type="text/javascript" src="<%= htmlWebpackPlugin.options.publicPath %>app/react/vendors/20190522_v1/art_framework.20190522_v1.js"></script>
  9. Build module

    When local module development fininshed, building source code.

    art build -m "home"

    A notice please chioce one environment to build will display, choicing Integrate Testing or Production, built files will be placed under debug or public directory respectively.

  10. Publish module

    art publish -m "home"

art-core's People

Contributors

lainazy avatar mr-yuhuashi avatar yuguomin avatar zbw322092 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

newhandsu

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.