Tag: zurb foundation

globby和rimraf应该删除除.yml文件之外的所有内容

下面的js代码(通过基础构build执行)应该实际上清除PATHS.springDist中定义的除.yml文件之外的整个文件夹,而是删除所有内容。 function cleanSpring(done) { globby([PATHS.springDist + '/*', '!.yml']).then(paths => { paths.map(item => { rimraf(item, done); }); }); } 什么可能是错的?

节点sass不导入

我正在用nodejs,electron和node-sass构build一个sass编译器。 将有一个configuration文件,将描述许多项目的一些“sass编译器”,用户将有能力通过GUI来激活和停用它们。 我用“电子”来pipe理界面,并使用电子“ipcmain”来按需启动编译器。 为了初始化编译器,我生成了一个包含整个编译器的subprocess。 编译完成以下代码: var result = this.sass.renderSync({ file: 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\scss\\style.scss', outFile: 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\css\\style.css', includePaths:[ 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\scss\\', 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\scss\\foundation\\components\\' ] }); 我使用绝对path执行编译,但文件是相对path。 我运行我的程序/ gui,并激活编译器,我有一个CSS文件。 问题是一些import缺less。 我的根文件夹位于'C:\ Users \ George \ Desktop \ css_compiler_tests \ test3 \'。 我尝试编译导入'scss_inculded-files.scss'的'scss \ style.scss'。 文件'scss_inculded-files'导入'scss \ foundation.scss',它导入'scss \ foundation \ components'格式。 这里是一个例子: /*scss\style.scss*/ @import "included-files"; /*scss\_inculded-files.scss*/ @import "includes/fonts", "includes/custom-colors", "includes/foundation-custom-settings", "foundation/settings", "foundation"; /*scss\foundation.scss*/ […]

无法在Node.js Express中使用表单

我正在尝试使用表单提交到网站,以便我可以呈现网站。 这是我的forms div.ten.columns#LogModal h3 Log In p a.button(href='#', data-reveal-id='exampleModal') Example modal div#exampleModal.reveal-modal h2 Log In p form(method='get', action='/Log') input(type='text', placeholder='Username', name='Username', id='Username') input(type='password', placeholder='Password', name='Password', id='Username') input(type='submit', value='Log in', id='LogButton') script(src='javascripts/foundation.min.js') script(src='javascripts/app.js') script $(window).load(function(){ $("#featured").orbit(); }); 它只是像这样通过server.js app.get('/Log', User.Home); 并最终呈现如下的网页: exports.Home = function (req, res) { res.render('MyHome'); }; 所有这一切都会导致这个错误: Cannot GET /Log?Username=&Password=&LogButton=Log+in 我希望它在这个时候没有任何login信息的工作,因为它只是现在的演示。 有谁能够帮助我?

JSON不使用Panini加载

我正在使用Zurb基金会的电子邮件 ,我正在创build一个非常简单的多语言电子邮件导出系统,我有这个data/lang.json : { "en": { "hello": "hello", "welcome": "Welcome to my website" }, "fr": { "hello": "Bonjour", "other": "Bienvenue sur mon site web" } } ..并根据<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">的lang属性 我需要从JSON中使用相应的对象。 Zurb使用Panini和把手,所以我正在做这个开始: {{lang.en.hello}} ..但没有显示在网页上。 我究竟做错了什么?

是否有可能创build一个网站和混合的应用程序(使用离子)相同的代码库,而无需重写任何东西

我想创build一个网站与其混合应用程序使用离子,我查了离子的文档http://ionicframework.com/getting-started/ ,我创build了一个离子应用程序的标签,但我也想处理我的网站,所以如果请求来自网页,那么普通的HTML应该像基础的web框架一起服务,我不想重复移动和网页的代码。 当我检查由离子产生的文件,它看起来像这样 <ion-modal-view> <ion-header-bar> <h1 class="title">Login</h1> <div class="buttons"> <button class="button button-clear" ng-click="closeLogin()">Close</button> </div> </ion-header-bar> <ion-content> <form ng-submit="doLogin()"> <div class="list"> <label class="item item-input"> <span class="input-label">Username</span> <input type="text" ng-model="loginData.username"> </label> <label class="item item-input"> <span class="input-label">Password</span> <input type="password" ng-model="loginData.password"> </label> <label class="item"> <button class="button button-block button-positive" type="submit">Log in</button> </label> </div> </form> </ion-content> </ion-modal-view> 所以有可能使用相同的代码的networking和应用程序(基础的networking和离子的应用程序)

通过CDN使用基金会图标集

我正在构build一个NodeJS应用程序,我正在使用Foundation作为我的前端。 我想使用Foundation提供的图标集,但是可以链接到图标集的CDN,而不是使用整个Foundatin框架的本地副本 ? 我find了一个CDN( //cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.ttf )图标集,但我有想法如何将其纳入我的应用程序。 在此先感谢您的帮助!

警告:可能的EventEmitter – 运行`foundation new`时出现节点警告

每次我在CLI中运行foundation new来启动一个新的基础项目时,我会得到一长串节点警告: (node:15500) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit (node:15500) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit (node:15500) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit (node:15500) Warning: Possible EventEmitter memory […]

Gulp.js与基础/指南针

有没有人成功地得到了Gulp-sass与基础4/5(与指南针最好?)工作 应用程序正在成功使用基础4,没有吞咽,使用compass watch 。 但是我想开始使用gulp来简化我的sass / coffee / minification编译。 这是我的gulpfile.js var gulp = require('gulp'), util = require('gulp-util'), sass = require('gulp-sass'), coffee = require('gulp-coffee'); var paths = { scripts: { src: 'src/coffee/**/*.coffee', dest: 'public/javascripts' }, styles: { src: 'src/sass/*.sass', dest: 'public/stylesheets' } }; gulp.task('scripts', function() { return gulp.src(paths.scripts.src) .pipe(coffee()) .pipe(gulp.dest(paths.scripts.dest)); }); gulp.task('sass', function () { return […]

通过NPM安装使用Zurb的基金会

我使用nodejs和npm相当新,所以请原谅。 我想在我的最新项目中使用Foundation,并使用npm来安装它。 这工作,我的node_modules现在包含基础目录。 我现在如何在我的标记中使用Foundation? 我有一个/public目录,其中包含我的意见,但肯定是不好的做法指向引用node_modules目录? 我是否在app.js创build了一个自定义path来创build基础目录中的文件? 我不确定最佳做法是什么? 帮助赞赏。