Git Product home page Git Product logo

steamer-react's Introduction

开发

npm run dev

编译

npm run pub

打开页面

  • 腾讯新闻主页 127.0.0.1:9000/index.html 或 127.0.0.1:9000/news/index.html

  • 腾讯新闻spa页 127.0.0.1:9000/spa.html 或 127.0.0.1:9000/news/spa.html

由于我们在webpack.server.js中,使用proxy映射路径到news,因此也可以带上路径news来访问

多个页面的开发

添加html到src/目录下就可以了,现在steamer-react会自动识别

Devtools

  • ctrl + h进行切换
  • ctrl + q切换位置

其它命令可以参考src/page/common/DevTools。可以调defaultSize设置自己喜欢的大小。目前默认设置在底部,占30%的屏幕大小。

文件目录

  • 单页面文件可参考 src/page/index
  • 单页应用可参考 src/page/spa

合图代码

请统一放在 src/page/xxx/container/xxx.scss中,可参考src/page/index里面的做法。 这里的问题囿于插件局限性,之后建议找更好的插件,或者我们自己写一个。

目前构建已经支持多个合图。只需要在src/img/sprites/下面新建文件夹,然后放在需要合的图,就会自动在src/css/文件夹下生成sprites/文件夹,里面包含了对应的合图和scss。

Windows下node-sass的安装

在node版本大于4.0的环境下,调用“npm rebuild node-sass ”时会自动安装“node-gyp”模块。window下的“node-gyp”模块需要以下配置:

尝试: https://github.com/nodejs/node-gyp/wiki/Visual-Studio-2010-Setup

更多使用办法

steamer-react's People

Contributors

lcxfs1991 avatar

Watchers

James Cloos avatar Robin 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.