0.3.24 • Published 8 years ago

nodewebx-server v0.3.24

Weekly downloads
3
License
MIT
Repository
gitlab
Last release
8 years ago

nodewebx-server


Usage

nodewebx server

LESS使用

version: >= 0.3.11 开始支持

在项目里面只用写less文件,模板里面直接引用.css路径(该文件不需要存在,nodewebx会 根据找该css路径下同名文件的less并编译返回)。

//HTML
<link href="http://127.0.0.1/css/style.css" type="text/css" rel="stylesheet" charset="utf-8">

//LESS文件(不需要手动保证.css文件的存在和更新,server会自动帮你编译)
├── dist
└── src
  ├── css
  │   └── style.less
  └── js

Config

http://127.0.0.1:3000/.config

LiveReload

项目配置文件nodewebx-config.js中新增liveReload段配置:

module.exports = {
  "liveReload": function (vfs, reload) {
    vfs.watch('source/**/*.js', function (event) {
      vfs.src(event.path)
        .pipe(reload());
    });
    vfs.watch('source/**/*.less', function (event) {
      vfs.src('source/css/modules/*.less')
        .pipe(reload({base:__dirname,extname:'.css'}));
    });
  },
  "webx": ...
}

浏览器中安装LiveReload扩展

0.3.24

8 years ago

0.3.23

9 years ago

0.3.22

9 years ago

0.3.21

9 years ago

0.3.19

9 years ago

0.3.18

9 years ago

0.3.17

9 years ago

0.3.16

9 years ago

0.3.15

9 years ago

0.3.14

9 years ago

0.3.13

9 years ago

0.3.12

9 years ago

0.3.11

9 years ago

0.3.9

9 years ago

0.3.8

9 years ago

0.3.7

9 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.10

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.0

10 years ago

0.0.20

10 years ago

0.0.19

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.9

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.1

10 years ago