Socket
Socket
Sign inDemoInstall

riot-cli

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot-cli - npm Package Compare versions

Comparing version 2.3.14 to 2.4.0

lib/tasks/New.js

8

lib/analyzer/index.js

@@ -60,3 +60,3 @@ 'use strict'

if (mode == 'tag') err = ERR_NO_INDENT
else err = ERR_INVALID_TAG
else err = ERR_INVALID_TAG
type = mode

@@ -77,3 +77,3 @@ } else if (m = row.match(STYLE_START)) {

if (m = row.match(HTML_END_DETECTOR)) type = 'template'
else type = mode
else type = mode
}

@@ -100,4 +100,4 @@

if (t == 'tag_end') mode = 'script'
else if (['template', 'style', 'script'].indexOf(t) > -1) mode = 'template'
else if (t == 'tag') results[i].type = mode
else if (['template', 'style', 'script'].indexOf(t) > -1) mode = 'template'
else if (t == 'tag') results[i].type = mode
}

@@ -104,0 +104,0 @@

@@ -0,12 +1,8 @@

'use strict'
module.exports = Object.freeze({
// global stuff
TEMP_FILE_NAME: /\/[^.~][^~/]+$/,
// cli messages TODO: add all the other messages here
NO_FILE_FOUND: 'Source path does not exist',
PREPROCESSOR_NOT_FOUND: function(type, id) {
return `The "${id}" ${type} preprocessor was not found. Have you installed it locally?`
},
// modular output fragments

@@ -24,3 +20,28 @@ MODULAR_START_FRAG: `

`,
MODULAR_END_FRAG: '});'
MODULAR_END_FRAG: '});',
TAG_CREATED_CORRECTLY: function(path) {
return `${path} created correctly!`
},
PREPROCESSOR_NOT_FOUND: function(type, id) {
return `The "${id}" ${type} preprocessor was not found. Have you installed it locally?`
},
// default tag template
TAG_TEMPLATE: function(tagName) {
return `
<${tagName}>
<p>Hi { message() }</p>
<script>
message() {
return 'there'
}
</script>
<style scoped>
:scope p {
color: #000;
}
</style>
</${tagName}>
`
}
})

@@ -20,2 +20,3 @@ #!/usr/bin/env node

Check = require('./tasks/Check'),
New = require('./tasks/New'),
Make = require('./tasks/Make'),

@@ -41,2 +42,3 @@ Watch = require('./tasks/Watch'),

},
new(opt) { return new New(opt) },
check(opt) { return new Check(opt) },

@@ -96,2 +98,3 @@ make(opt) { return new Make(opt) },

css: args.css,
new: args.new,
export: args.export,

@@ -98,0 +101,0 @@ colors: args.colors,

@@ -0,1 +1,3 @@

'use strict'
const helpers = require('./helpers')

@@ -18,2 +20,8 @@

Create an empty tag template
riot --new foo
riot --new foo/bar
riot --new foo/bar --ext html
Examples for options:

@@ -104,2 +112,9 @@

{
option: 'new',
type: 'String',
alias: 'n',
description: 'Create an empty tag template',
example: 'riot --new foo'
},
{
option: 'type',

@@ -106,0 +121,0 @@ alias: 't',

{
"name": "riot-cli",
"version": "2.3.14",
"version": "2.4.0",
"description": "Riot command line utility",

@@ -27,7 +27,7 @@ "main": "lib/index.js",

"devDependencies": {
"coveralls": "^2.11.6",
"eslint": "^1.10.3",
"coveralls": "^2.11.9",
"eslint": "^2.5.3",
"expect.js": "^0.3.1",
"istanbul": "^0.4.1",
"mocha": "^2.3.4"
"istanbul": "^0.4.2",
"mocha": "^2.4.5"
},

@@ -41,10 +41,10 @@ "license": "MIT",

"dependencies": {
"chalk": "^1.1.1",
"chokidar": "^1.4.1",
"chalk": "^1.1.3",
"chokidar": "^1.4.3",
"co": "^4.6.0",
"optionator": "^0.7.1",
"optionator": "^0.8.1",
"riot-compiler": "^2.3.*",
"rollup": "^0.21.3",
"shelljs": "^0.5.3"
"rollup": "^0.25.7",
"shelljs": "^0.6.0"
}
}
riot.tag2('jade', '<p>{message}</p>', '', '', function(opts) {
this.message = 'hi'
}, '{ }');
});
riot.tag2('tag', '<p>HI</p>', 'tag,[riot-tag="tag"] { color: red }', '', function(opts) {
riot.tag2('tag', '<p>HI</p>', 'tag,[riot-tag="tag"],[data-is="tag"]{ color: red }', '', function(opts) {
var baz ="baz"
});
riot.tag2('exclude', '<p>{msg}</p>', '', '', function(opts) {
}, '{ }');
});

@@ -5,2 +5,2 @@ riot.tag2('exclude', '<p>{msg}</p>', '', '', function(opts) {

}, '{ }');
});

@@ -116,2 +116,3 @@ require('shelljs/global')

})
expect(cat(`${GENERATED_FOLDER}/export/make-tags.css`)).to.be(cat(`${EXPECTED_FOLDER}/export/tags.css`))

@@ -131,2 +132,3 @@

expect(cat(`${GENERATED_FOLDER}/export/make-tags.scss.css`).replace(/\n/g, '')).to.be(cat(`${EXPECTED_FOLDER}/export/tags.scss.css`).replace(/\n/g, ''))
})

@@ -133,0 +135,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc