Download pool/shard007/JavaScript/0044090_index.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 868 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044090_index.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard007/JavaScript/0044090_index.js
-
curl -L -o 0044090_index.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044090_index.js
868 Bytes
| var yeoman = require('yeoman-generator') | |
| var fs = require('fs') | |
| var path = require('path') | |
| module.exports = yeoman.generators.Base.extend({ | |
| constructor: function () { | |
| yeoman.generators.Base.apply(this, arguments) | |
| this.argument('viewname', {type: String, required: true}) | |
| }, | |
| writing: function () { | |
| var props = this.config.getAll() | |
| props.viewname = this.viewname | |
| try { | |
| fs.accessSync(this.destinationPath('view'), fs.F_OK) | |
| var destinationPath = this.destinationPath('view') | |
| } catch (e) { | |
| destinationPath = this.destinationPath() | |
| } | |
| this.fs.copyTpl(this.templatePath('template.view.xml'), path.resolve(destinationPath, this.viewname + '.view.xml'), props) | |
| this.fs.copyTpl(this.templatePath('template.controller.js'), path.resolve(destinationPath, this.viewname + '.controller.js'), props) | |
| } | |
| }) | |