简体   繁体   English

前端开发环境搭建

[英]Environment setup for front-end development

I'm trying to get a good environment setup for front-end development.我正在尝试为前端开发建立良好的环境设置。 I want to do some javascript development.我想做一些javascript开发。

I'm looking to figure out how to have one of those webpages that keeps reloading as I save my work in my editor.我正在寻找如何让其中一个网页在我将工作保存在编辑器中时不断重新加载。 I'm using vim as an editor and Ruby on Rails with Webrick.我使用 vim 作为编辑器,使用 Ruby on Rails 和 Webrick。

Any help would be great!任何帮助都会很棒!

You probably want to look into a BDD tool like cucumber (rspec), although https://github.com/mynyml/holygrail looks promising!您可能想研究像 cucumber (rspec) 这样的 BDD 工具,尽管https://github.com/mynyml/holygrail看起来很有希望!

Have a look here at http://cukes.info/ ..if you go down the rspec path and you want to do JS testing you'll need a tool like culerity ( a headless browser solution that mashes ruby with jruby, junit and cucumber ) or selenium2 webdriver which actually automates your browser ( slower but easier to set up )看看这里http://cukes.info/ ..如果你走下 rspec 路径并且想要进行 JS 测试,你将需要一个像 culerity 这样的工具(一个无头浏览器解决方案,它将 ruby​​ 与 jruby、junit 和cucumber )或 selenium2 webdriver ,它实际上使您的浏览器自动化(速度较慢但更容易设置)

capybara is a tool which attempts to integrate all these solutions, its worth a look. capybara 是一个试图整合所有这些解决方案的工具,值得一看。

Also check out Xrefresh:另请查看 Xrefresh:

http://ruby5.envylabs.com/episodes/53-episode-51-february-16-2010/stories/414-xrefresh-automatic-browser-reload-for-ruby http://ruby5.envylabs.com/episodes/53-episode-51-february-16-2010/stories/414-xrefresh-automatic-browser-reload-for-ruby

I know this is old.. but maybe new Front end developers still would like to know a modern answer to the original question:我知道这是旧的.. 但也许新的前端开发人员仍然想知道原始问题的现代答案:

Please give VueJS a shot!请给 VueJS 一个机会! Vue comes bundled with hotreload, eslint, and other cool tools to help new developers get started! Vue 捆绑了 hotreload、eslint 和其他很酷的工具来帮助新开发人员入门! It runs locally in your browser, you can open the same 192.1... :8080 url in other devices on the same network to see your page changes on real time (helpful for responsive development)它在您的浏览器本地运行,您可以在同一网络上的其他设备中打开相同的 192.1... :8080 url 以实时查看您的页面更改(有助于响应式开发)

You can create user interfaces quickly once you learn the basics.学习基础知识后,您可以快速创建用户界面。 It's a small learning curve and as long as you know HTML, CSS, JS you will learn it quickly!这是一个很小的学习曲线,只要你了解 HTML、CSS、JS,你就会很快学会!

Theres so much more about it than i could talk here, but give it a shot and you won't regret it.关于它的内容比我在这里可以谈论的要多,但试一试,你不会后悔的。

https://v2.vuejs.org/v2/guide/ https://v2.vuejs.org/v2/guide/

Running VueJs in your local machine is so easy!在本地机器上运行 VueJs 非常简单! like five baby steps.像五个婴儿步骤。

install with npm使用 npm 安装

npm i -g @vue/cli @vue/cli-service-global npm i -g @vue/cli @vue/cli-service-global

install with yarn用纱线安装

yarn global add @vue/cli @vue/cli-service-global yarn global add @vue/cli @vue/cli-service-global

Now that we have Vue CLI installed globally, we can use the vue command anywhere.现在我们已经全局安装了 Vue CLI,我们可以在任何地方使用 vue 命令。 We'll use vue create to start a new project.我们将使用 vue create 来启动一个新项目。

vue create vue-app vue 创建 vue-app

cd vue-app npm run serve cd vue-app npm run 服务

or或者

yarn run serve纱线运行服务

Once that's done, you can navigate to http://localhost:8080/ to see the default page.完成后,您可以导航到http://localhost:8080/以查看默认页面。

I've developed a small framework on VueJs to showcase front end development wireframes.我在 VueJs 上开发了一个小框架来展示前端开发线框。 Maybe you could use my example as a Boilerplate starting point to develop your front end development code.也许您可以使用我的示例作为开发前端开发代码的样板起点。 Although my code is not perfect, I do hope it helps developers get familiar with Vuejs.虽然我的代码并不完美,但我希望它能帮助开发人员熟悉 Vuejs。 Learn it's wonders and create new magic :D了解它的奇迹并创造新的魔法:D

https://github.com/ozzgn/Vue-Wireframe-Showcase-Framework https://github.com/ozzgn/Vue-Wireframe-Showcase-Framework

Peace!和平!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM