Code Monkey home page Code Monkey logo

grunt-ejs2seajs's Introduction

Advantage:

优点:

  • Easy to debug

  • 便于调试

  • Nodejs usable

  • 可用于nodejs

  • No XSS

  • 避免XSS


Debugging in chrome dev tools:

支持在Chrome开发者工具中断点调试:

alt debugging in chrome

For simple and thin, only support tags <%= %> , <%- %> or <% %>

为了足够简单,目前只支持 <%= %><%- %><% %> 标签


Installation

安装

In your project's gruntfile directory, run:

在你的Gruntfile.js所在目录下,执行:

npm install grunt-ejs2seajs --save-dev

Then add this line to your project's gruntfile:

添加下面这句到你的Gruntfile.js中:

grunt.loadNpmTasks('grunt-ejs2seajs');

Usage

ejs2seajs: {
    template: {
        src: [
            'src/js/**/tpls' // target to the "tpls" directories
        ],
        expand: true
    }
}

example directories:

目录结构示例:

...
|_ tpls/
| |_ a.ejs
| |_ b.ejs
|_ tpls.js <- require this file

then start grunt, you will see the log like this:

启动 grun 后看到下面的输出即正常:

$ grunt ↵

> Running "ejs2seajs:template" (ejs2seajs) task
> File "src/js/modules/my-module1/tpls.js" created.

> Running "watch" task
> Waiting...

grunt-ejs2seajs's People

Contributors

charmingzuo avatar

Watchers

 avatar  avatar

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.