Skip to content

Commit

Permalink
🏁 v0.0.6-beta.3 ➖ updated fs with updates from stts/ti-fs
Browse files Browse the repository at this point in the history
  • Loading branch information
brentonhouse committed Dec 28, 2016
1 parent 3465733 commit 978a10d
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 7 deletions.
77 changes: 73 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,22 @@
//-------- Editor configuration --------

// Configure file associations to languages (e.g. "*.extension": "html"). These have precedence over the default associations of the languages installed.
"files.associations": {
"*.tss": "javascript"
"files.associations": {
"*.tss": "javascript",
"*.jmk": "javascript"
},

// The number of spaces a tab is equal to.
"editor.tabSize": 4,

// Insert spaces when pressing Tab.
"editor.insertSpaces": false,

// When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents.
"editor.detectIndentation": false,



//-------- Files configuration --------

// Configure glob patterns for excluding files and folders.
Expand All @@ -32,6 +44,25 @@
"**/Resources": true
},

// HTML

// Maximum amount of characters per line (0 = disable).
"html.format.wrapLineLength": 150,

// Format and indent {{#foo}} and {{/foo}}.
"html.format.indentHandlebars": true,

"html.format.extraLiners": true,

// TypeScript

// Defines space handling after opening and before closing non empty parenthesis
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,

// Defines space handling after opening and before closing non empty brackets
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,


// File extensions that can be beautified as HTML.
"beautify.HTMLfiles": [
"htm",
Expand All @@ -46,6 +77,44 @@
"jsbeautifyrc",
"jshintrc",
"tss"
]

],

// Set path/file matchers to ignore when attempting to beautify on save. Uses glob path matching.
"beautify.onSaveIgnore": [
"**/*+(.|_|-)min.*"
],

// Use `.editorconfig` settings
"beautify.editorconfig": false,

// Link file types to the beautifier type
"beautify.language": {
"js": {
"type": [
"javascript",
"json"
],
"filename": [
".jshintrc",
".jsbeautify"
],
"ext": [ "js",
"json",
"jsbeautifyrc",
"jshintrc",
"tss"
]
},
"css": [
"css",
"scss"
],
"html": [
"htm",
"html",
"xml",
"entitlements"
]
},

}
10 changes: 8 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,13 @@ fs.open = function open(path, flags, mode, callback) {

fs.openSync = function openSync(path, flags, mode) {
var tiMode = assertFlags(flags),
file = $F.getFile(path),
fd = file.open(tiMode);
file = $F.getFile(path);

if (tiMode === $F.MODE_APPEND && !fs.existsSync(path)) {
file.open($F.MODE_WRITE).close();
}

var fd = file.open(tiMode);
fd.__path = path;
return fd;
};
Expand Down Expand Up @@ -847,6 +852,7 @@ function maybeCallback(o) {
return o && util.isFunction(o) ? o : function(err) {
if (err) {
throw err;
throw err;
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativeloop",
"version": "0.0.6-beta.2",
"version": "0.0.6-beta.3",
"description": "Tool for building {nativeloop} mobile apps",
"keywords": [
"nativeloop",
Expand Down

0 comments on commit 978a10d

Please sign in to comment.