D:\Projects\mallspk>grunt serve
Running "serve" task
Running "clean:server" (clean) task
>> 0 paths cleaned.
Running "wiredep:app" (wiredep) task
Running "wiredep:test" (wiredep) task
Running "wiredep:sass" (wiredep) task
Running "concurrent:server" (concurrent) task
Warning: Running "compass:server" (compass) task
Warning: Command failed: 'compass.bat' is not recognized as an internal or exter
nal command,
operable program or batch file.
Use --force to continue.
Run Code Online (Sandbox Code Playgroud)
我已经安装Yo angular并运行以下命令:
npm install grunt --save-dev
npm install -g grunt-contrib-compass
npm install -g compass
npm install
bower install
npm install grunt-google-cdn …Run Code Online (Sandbox Code Playgroud) 我是Angular,ui-router和generator-ng-poly的新手,我希望有人能帮助解决一个简单的语法问题.
我正在使用generator-ng-poly进行新项目,并使用ui-router和HTML在基于Angular 1.3的应用程序的"深层示例"中工作.
首先,我创建了一个"home"模块,然后在其中创建了一个"header"模块.所以...
yo ng-poly:module home
yo ng-poly:module home/header
Run Code Online (Sandbox Code Playgroud)
这给了我这两个控制器:app/home/home.js
(function () {
'use strict';
/* @ngdoc object
* @name home
* @requires $stateProvider
*
* @description
*
*/
angular
.module('home', [
'ui.router',
'home.header'
]);
angular
.module('home')
.config(config);
function config($stateProvider) {
$stateProvider
.state('home', {
url: '/home',
templateUrl: 'home/home.tpl.html',
controller: 'HomeCtrl',
controllerAs: 'home'
});
}
})();
Run Code Online (Sandbox Code Playgroud)
和app/home/header/header.js
(function () {
'use strict';
/* @ngdoc object
* @name home.header
* @requires $stateProvider
*
* @description
*
*/
angular
.module('home.header', …Run Code Online (Sandbox Code Playgroud) 我想部署一个简单的角度projet,使用角度fullstack.
https://github.com/DaftMonk/generator-angular-fullstack
我试过了 :
yo angular-fullstack test
grunt build
Run Code Online (Sandbox Code Playgroud)
然后,在dist我有2个文件夹:server和public.
如何在Linux服务器上部署它们?
与forever/node和nginx ??? 我想自己主持我的项目.
谢谢
我想在我的ubuntu v16.4 LTS上安装你,但我收到这个错误:
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v6.2.0
npm ERR! npm v3.9.0
npm ERR! path /usr/local/lib/node_modules/yo/lib/cli.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/yo/lib/cli.js'
npm ERR! enoent ENOENT: no such file or directory, …Run Code Online (Sandbox Code Playgroud) 我正在尝试设置你以使用角度生成器进行项目.我按照这里详细说明的步骤进行操作:http://yeoman.io/learning/index.html
我已经安装了Node.js和NPM.
但是当我使用命令时:
sudo npm install -g yo bower grunt-cli
Run Code Online (Sandbox Code Playgroud)
它失败了,我收到了这个错误:
> spawn-sync@1.0.11 postinstall /usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall
fs.js:439
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES, permission denied '/usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/package.json'
at Object.fs.openSync (fs.js:439:18)
at Object.fs.writeFileSync (fs.js:978:15)
at Object.<anonymous> (/usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/postinstall.js:20:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! node v0.10.37
npm ERR! npm v2.11.0
npm …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用纱线生成一个jHipster项目 - https://jhipster.github.io/installation/
我从其网站安装了Node,并使用brew安装了yarn.
纱线版本0.19.1节点版本v7.5.0 OSX Sierra 10.12.3
当我运行时yarn global add generator-jhipster,我可以看到jhispter生成器被复制到/Users/{username}/.config/yarn/global/node_modules/
my-mac:~ user$ yarn global add generator-jhipster
yarn global v0.19.1
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning undefined has no binaries
warning No license field
? Done in 30.68s.
Run Code Online (Sandbox Code Playgroud)
下一步,当我跑yo jhipster,它找不到jhipster.但是,当我跑步时yarn add generator-jhipster,你可以从当前文件夹中找到jhipster.不确定添加全球位置有什么问题.
my-mac:~ user$ echo $PATH
/usr/local/sbin:~/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Cellar/node/7.5.0/bin:/Users/{user}/.config/yarn/global/node_modules/.bin
Run Code Online (Sandbox Code Playgroud)
我们将不胜感激,以确定最新的纱线版本是否存在任何问题.
my-mac:~ user$ yo jhipster
Error jhipster
You don’t seem to have a generator …Run Code Online (Sandbox Code Playgroud) 以下是我不断得到的错误.它似乎表明了yodoctor的"安装后"问题.可悲的是,yodoctor是自耕农队提出的帮助解决这个问题的建议.我安装了其他node_modules(bower,grunt,typescript).
sh: yodoctor: command not found
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v5.0.0
npm ERR! npm v3.3.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! yo@1.5.0 postinstall: `yodoctor`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the yo@1.5.0 postinstall script 'yodoctor'.
npm ERR! This is most likely a problem with the yo package,
npm ERR! not with npm itself. …Run Code Online (Sandbox Code Playgroud) 我想用Visual Studio Code创建一个新的C#解决方案.
我正在使用你的工具.
现在我有一个ASP项目的文件夹.还有另一个带有类库的文件夹.
如何从asp项目引用类库?
似乎我必须向project.json添加依赖项:
"dependencies": {
"ClassLibrar.Name": "*"
}
Run Code Online (Sandbox Code Playgroud)
但为了使这成为可能,我需要解决方案文件.但VS Code和哟并没有创造出这样的.
UPD VS Code可以在不同的操作系统中使用,而VS只能从Windows访问,我想用VS代码创建一个新的解决方案.
简单要求:创建Web项目和1 +类库.
所有这些都将打包在docker容器中
我的项目是一个非常基本的yo/angular项目.我有以下cssmin配置.
useminPrepare: {
html: '<%= yeoman.app %>/index.html',
options: {
dest: '<%= yeoman.dist %>',
flow: {
html: {
steps: {
js: ['concat', 'uglifyjs'],
css: ['cssmin']
},
post: {}
}
}
}
},
...
cssmin: {
dist: {
files: {
'<%= yeoman.dist %>/styles/main.css': [
'.tmp/styles/{,*/}*.css'
]
}
}
},
...
grunt.registerTask('build', [
'clean:dist',
'wiredep',
'useminPrepare',
'concurrent:dist',
'autoprefixer',
'concat',
'ngAnnotate',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
'filerev',
'usemin',
'htmlmin'
]);
Run Code Online (Sandbox Code Playgroud)
当我运行grunt构建时,我收到以下错误:
Running "cssmin:generated" (cssmin) task
Warning: Path must be a string. Received undefined Use --force …Run Code Online (Sandbox Code Playgroud) 我不仅可以从项目根目录还可以从子文件夹运行 NPM 脚本,这很好。但是,受限于它不能告诉我当前的工作路径 ($PWD)。
假设有一个这样的命令:
"scripts": {
...
"pwd": "echo $PWD"
}
Run Code Online (Sandbox Code Playgroud)
如果我npm run pwd在项目根目录的子文件夹中运行(例如,$PROJECT_ROOT/src/nested/dir),它不会打印出我当前的路径$PROJECT_ROOT/src/nested/dir,而是总是$PROJECT_ROOT返回。有没有办法告诉 NPM 脚本使用我当前的工作目录而不是解析到package.json所在的位置?
基本上,我想将 Yeoman 生成器拉入现有项目并通过 NPM 脚本使用它,以便每个人都可以使用共享知识(例如npm run generator),而不是学习任何特定于 Yeoman 的东西(例如npm i yo -g; yo generator)。由于生成器根据当前工作路径生成文件,而 NPM 脚本始终解析为项目根目录,因此我无法在打算使用的地方使用生成器。
yo ×10
angularjs ×4
node.js ×3
yeoman ×3
gruntjs ×2
npm ×2
asp.net-core ×1
c# ×1
dnx ×1
grunt-usemin ×1
javascript ×1
jhipster ×1
nginx ×1
npm-scripts ×1
pwd ×1
ubuntu ×1
yarnpkg ×1