Giter VIP home page Giter VIP logo

jade-autocompile's Introduction

jade-autocompile package Build Status apm apm

Auto compile JADE files on save

Atom package site

Configuration

The two first comment blocks of file can be used to pass parameters to the compiler.

  • The first one must have the name of the output html file, like this:

    //output:output.html

    If you avoid this comment, the file is omitted by the compiler.

    The output parameter supports relatives paths and two variables replacement.

    • $1: Name of the original jade file
    • $2: Extension of the original file.

    Also you can add other properties to the compiler, like this:

    //output:output.html, pretty:false
  • The second block can have a javascript object to be used as locals for the compiler.

    //{
        name: 'Manuel',
        date: new Date,
        myFunc: function(){
          return true;
        }
      }

License

The MIT License (MIT)

Copyright (c) 2015 Manuel Rueda

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jade-autocompile's People

Contributors

greenkeeperio-bot avatar jerone avatar manrueda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jade-autocompile's Issues

Uncaught TypeError: Cannot read property 'trim' of undefined

  1. Write jade
  2. Save file
//- mixin type(elementType, type, value, label)
//-   if(elementType == type)
//-     option(value='#{value}', label='#{label}', selected='selected') #{label}
//-   else
//-     option(value='#{value}', label='#{label}') #{label}
//-     
mixin owner(role, element)
  if(element.get('type') == 'Entity')
    if(role.get('source') == element.get('id'))
      option(value='#{element.id}', label='#{element.get("name")}', selected='selected') #{element.get('name')}
    else
      option(value='#{element.id}', label='#{element.get("name")}') #{element.get('name')}

mixin role(selectedElement, elements)
  if(selectedElement.type == 'Role')
    #ownerLabel.col-sm-4
      label(form='editElement') Owner:
    #ownerSelect.col-sm-8
      select(form='editElement', name='owner')
        each element in elements
          +owner(selectedElement, element)
.row#editElement
  form(name='editElement')
    input(form='editElement', type='hidden', name='elementId', value='#{selectedElement.get("id")}')
    label(form="editElement") Name:
    input(form="editElement", name='name', type='text', value="#{selectedElement.get('name')}")
    button#saveElement.btn.btn-primary(type="button", onclick='controller.saveElement(selectedElement.get("id"))') Save
    button#cancelElement.btn.btn-warning(type='button', onclick='controller.emptyToolbox()') Cancel
    +role(selectedElement, elements)

Atom Version: 1.1.0
System: Mac OS X 10.11.1
Thrown From: jade-autocompile package, v0.6.4

Stack Trace

Uncaught TypeError: Cannot read property 'trim' of undefined

At /Users/tom/.atom/packages/jade-autocompile/lib/jade-autocompile.js:27

TypeError: Cannot read property 'trim' of undefined
  at getOptions (/Users/tom/.atom/packages/jade-autocompile/lib/jade-autocompile.js:27:42)
  at readFile (/Users/tom/.atom/packages/jade-autocompile/lib/jade-autocompile.js:114:16)
  at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

Commands

  2x -3:36.8.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -3:34.2.0 core:move-right (atom-text-editor.editor.is-focused.autocomplete-active)
 19x -3:32.6.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -2:39.1.0 core:move-right (atom-text-editor.editor.is-focused)
     -2:35 editor:newline (atom-text-editor.editor.is-focused)
     -2:22.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:19.6.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -2:12.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:48.9.0 core:save (atom-text-editor.editor.is-focused)
  3x -1:39.5.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -1:37 core:move-right (atom-text-editor.editor.is-focused)
     -1:34.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:55.6.0 editor:newline (atom-text-editor.editor.is-focused)
  8x -0:52.8.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -0:09.3.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:06.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)

Config

{
  "core": {
    "disabledPackages": [
      "language-make",
      "language-clojure",
      "language-go",
      "language-perl",
      "language-php",
      "language-ruby",
      "language-ruby-on-rails",
      "language-toml",
      "package-generator",
      "welcome",
      "atom-coffee-repl",
      "wrap-guide",
      "linter-coffeescript",
      "vim-mode",
      "minimap",
      "swackets"
    ],
    "ignoredNames": [
      ".DS_Store",
      ".git"
    ],
    "audioBeep": false,
    "projectHome": "/Users/tom/dev",
    "excludeVcsIgnoredPaths": false,
    "themes": [
      "isotope-ui",
      "solarized-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.28.16
atom-jade, v0.3.0
atom-ternjs, v0.8.4
colorful-json, v1.0.0
editorconfig, v1.2.2
esformatter, v1.16.0
fetch, v0.3.0
highlight-line, v0.11.0
isotope-ui, v2.7.0
jade-autocompile, v0.6.4
jsonlint, v1.1.2
language-babel, v1.0.0
language-docker, v1.1.3
language-jade, v0.6.2
language-viml, v0.2.0
linter, v1.10.0
linter-eslint, v4.0.0
linter-jsonlint, v1.0.1
pigments, v0.18.1
pretty-json, v0.4.1
react, v0.12.10
tool-bar, v0.1.9

# Dev
bracket-matcher, v0.76.0

Pug support

Please integrate Pug support (Jade was renamed to pug in node)

include not working

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.2
System: Mac OS X 10.10.4
Thrown From: jade-autocompile package, v0.6.2

Stack Trace

Uncaught Error: Jade:3
1| doctype html
2| html

3| include ./includes/head.jade
4| body
5| h1 My site
6|

the "filename" option is required to use "include" with "relative" paths

At /Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/runtime.js:240

Error: Jade:3
    1| doctype html
    2| html
  > 3|   include ./includes/head.jade
    4|   body
    5|     h1 My site
    6|     

the "filename" option is required to use "include" with "relative" paths
  at Parser.resolvePath (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:486:13)
  at Parser.parseInclude (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:585:21)
  at Parser.parseExpr (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:223:21)
  at Parser.block (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:729:25)
  at Parser.tag (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:838:24)
  at Parser.parseTag (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:759:17)
  at Parser.parseExpr (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:211:21)
  at Parser.parse (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/parser.js:122:25)
  at parse (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:104:21)
  at Object.exports.compile (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:205:16)
  at handleTemplateCache (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:174:25)
  at Object.exports.render (/Users/godric/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:349:10)
  at /Users/godric/.atom/packages/jade-autocompile/lib/jade-autocompile.js:122:25
  at Object.exports.allowUnsafeEval (/Users/godric/.atom/packages/jade-autocompile/node_modules/loophole/lib/loophole.js:14:14)
  at /Users/godric/.atom/packages/jade-autocompile/lib/jade-autocompile.js:121:27
  at Object.exports.allowUnsafeNewFunction (/Users/godric/.atom/packages/jade-autocompile/node_modules/loophole/lib/loophole.js:25:14)
  at readFile (/Users/godric/.atom/packages/jade-autocompile/lib/jade-autocompile.js:120:35)
  at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:379:3)

Commands

     -1:11.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:10.4.0 core:save (atom-text-editor.editor.is-focused)
     -0:59.1.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:58.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:58.4.0 core:save (atom-text-editor.editor.is-focused)
  7x -0:50.1.0 core:move-right (atom-text-editor.editor.is-focused)
  8x -0:48.8.0 core:move-left (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:46.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:45.2.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:44.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:44 core:save (atom-text-editor.editor.is-focused)
  3x -0:35.6.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -0:20.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:07.6.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:07.6.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:01.5.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "atom-material-syntax"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.28.8
atom-jade, v0.3.0
atom-material-syntax, v0.2.1
autocomplete-sass, v0.1.0
color-picker, v2.0.11
css-snippets, v0.8.0
emmet, v2.3.12
jade-autocompile, v0.6.2
language-jade, v0.5.1
pigments, v0.9.2
sass-autocompile, v0.7.3
sass-watch, v0.3.1

# Dev
No dev packages

2015-07-28 11 43 22

Uncaught SyntaxError: Unexpected token (1:11)

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.1.0
System: Ubuntu 14.04.3
Thrown From: jade-autocompile package, v0.6.3

Stack Trace

Uncaught SyntaxError: Unexpected token (1:11)

At /home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1747

SyntaxError: Unexpected token (1:11)
  at Parser.pp.raise (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1745:13)
  at Parser.pp.unexpected (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:2264:8)
  at Parser.pp.parseBindingAtom (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1876:12)
  at Parser.pp.parseMaybeDefault (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1920:23)
  at Parser.pp.parseBindingList (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1896:23)
  at Parser.pp.parseFunctionParams (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:2776:22)
  at Parser.pp.parseFunction (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:2769:8)
  at Parser.pp.parseExprAtom (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1129:19)
  at Parser.pp.parseExprSubscripts (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1023:19)
  at Parser.pp.parseMaybeUnary (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1004:19)
  at Parser.pp.parseExprOps (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:948:19)
  at Parser.pp.parseMaybeConditional (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:930:19)
  at Parser.pp.parseMaybeAssign (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:908:19)
  at Parser.pp.parseParenAndDistinguishExpression (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1188:28)
  at Parser.pp.parseExprAtom (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1111:19)
  at Parser.pp.parseExprSubscripts (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1023:19)
  at Parser.pp.parseMaybeUnary (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:1004:19)
  at Parser.pp.parseExprOps (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:948:19)
  at Parser.pp.parseMaybeConditional (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:930:19)
  at Parser.pp.parseMaybeAssign (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:908:19)
  at Parser.pp.parseExpression (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:882:19)
  at Parser.pp.parseStatement (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:2461:23)
  at Parser.pp.parseTopLevel (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:2379:21)
  at Object.parse (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/node_modules/acorn/dist/acorn.js:101:12)
  at reallyParse (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/index.js:24:18)
  at unwrapReturns (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/index.js:90:13)
  at addWith (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/node_modules/with/index.js:77:37)
  at parse (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:149:9)
  at Object.exports.compile (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:205:16)
  at handleTemplateCache (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:174:25)
  at Object.exports.render (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/jade/lib/index.js:349:10)
  at /home/krotovicl/.atom/packages/jade-autocompile/lib/jade-autocompile.js:129:25
  at Object.exports.allowUnsafeEval (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/loophole/lib/loophole.js:14:14)
  at /home/krotovicl/.atom/packages/jade-autocompile/lib/jade-autocompile.js:128:27
  at Object.exports.allowUnsafeNewFunction (/home/krotovicl/.atom/packages/jade-autocompile/node_modules/loophole/lib/loophole.js:25:14)
  at readFile (/home/krotovicl/.atom/packages/jade-autocompile/lib/jade-autocompile.js:127:35)
  at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

Commands

     -0:13.2.0 core:save (input.hidden-input)

Config

{
  "core": {
    "projectHome": "/home/krotovicl/Workspace",
    "themes": [
      "nucleus-dark-ui",
      "batman-syntax"
    ],
    "disabledPackages": [
      "markdown-preview",
      "autocomplete-css"
    ],
    "packagesWithKeymapsDisabled": [
      "build-npm-apm"
    ]
  }
}

Installed Packages

# User
.bin, vundefined
angularjs, v0.3.3
atom-beautify, v0.28.16
atom-jade, v0.3.0
atom-jasmine, v0.6.0
atom-typescript, v7.7.0
autocomplete-modules, v1.3.1
batman-syntax, v1.0.1
bower-install, v0.2.4
build, v0.48.0
build-gulp, v0.2.0
build-npm-apm, v0.2.0
color-picker, v2.0.13
emmet, v2.3.13
gulp-snippets, v0.6.2
jade-autocompile, v0.6.3
language-docker, v1.1.3
language-nginx, v0.6.1
language-svg, v0.9.0
less-autocompile, v1.0.0
linter, v1.10.0
markdown-preview-plus, v2.2.2
mathjax-wrapper, v0.1.0
nucleus-dark-ui, v0.6.6
pigments, v0.18.1
project-manager, v2.6.5
sass-autocompile, v0.10.7
svg-preview, v0.6.1
travis-ci-status, v0.18.0

# Dev
No dev packages

Uncaught TypeError: Cannot set property 'jade_compiled' of undefined

[Enter steps to reproduce below:]

  1. install language-jade...
  2. at end of install, this error message showed up

Atom Version: 1.3.2
System: Microsoft Windows 7 Professional
Thrown From: jade-autocompile package, v0.8.2

Stack Trace

Uncaught TypeError: Cannot set property 'jade_compiled' of undefined

At C:\Users\Lynne\.atom\packages\jade-autocompile\lib\jade-autocompile.js:198

TypeError: Cannot set property 'jade_compiled' of undefined
    at C:\Users\Lynne\.atom\packages\jade-autocompile\lib\jade-autocompile.js:198:48
    at Emitter.module.exports.Emitter.emit (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\text-editor.js:210:32
    at Emitter.module.exports.Emitter.emit (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at DisplayBuffer.module.exports.DisplayBuffer.emitDidChange (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\display-buffer.js:313:20)
    at DisplayBuffer.module.exports.DisplayBuffer.updateScreenLines (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\display-buffer.js:1224:19)
    at DisplayBuffer.module.exports.DisplayBuffer.handleTokenizedBufferChange (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\display-buffer.js:1186:19)
    at C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\display-buffer.js:5:61
    at Emitter.module.exports.Emitter.emit (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at TokenizedBuffer.module.exports.TokenizedBuffer.retokenizeLines (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\tokenized-buffer.js:228:27)
    at TokenizedBuffer.module.exports.TokenizedBuffer.setGrammar (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\tokenized-buffer.js:180:12)
    at TokenizedBuffer.module.exports.TokenizedBuffer.grammarAddedOrUpdated (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\tokenized-buffer.js:121:23)
    at C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\tokenized-buffer.js:3:61
    at Emitter.module.exports.Emitter.emit (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at GrammarRegistry.module.exports.GrammarRegistry.addGrammar (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\first-mate\lib\grammar-registry.js:75:20)
    at Grammar.module.exports.Grammar.activate (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\first-mate\lib\grammar.js:223:48)
    at C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\src\package.js:485:25
    at C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\first-mate\lib\grammar-registry.js:120:55
    at parseContents (C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\season\lib\cson.js:119:7)
    at C:\Users\Lynne\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\season\lib\cson.js:200:24
    at FSReqWrap.oncomplete (fs.js:82:15)

Commands

     -9:11.3.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -8:43.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -8:43.4.0 html2jade-plus:convert (atom-text-editor.editor)
     -6:25.6.0 grammar-selector:show (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "base16-tomorrow-light-theme"
    ],
    "audioBeep": false
  }
}

Installed Packages

# User
atom-jade, v0.3.0
color-picker, v2.0.14
html2jade-plus, v1.0.0
jade-autocompile, v0.8.2

# Dev
No dev packages

Compile main file

Is it possible to add a feature like "main" option present in less compiler ?

Example:
I got a jade file that extends a template or include another jade file. I edit the included file and save.
Now it would be awesome if it could compile the main file ( passed by another parameter like main:../index.jade )

Hope that you can implement this

Thanks :)

Bug with compiled html file

Hi, anyone can help me?
After *.pug file compilation to html - <HTML> tag does not close at the end of the document :(
Like this:

<!DOCTYPE html>
<html lang="" class="no-js">
</html>
<head>

How to repair that? Any one have same problem?
Editor: Atom v1.12.5
Package version of "autocompiler-pug-jade" is "v2.0.1"

Jekyll friendliness

I have sent an email about it, but I'll write it here as well.

I would love for this package to be more Jekyll friendly.

As of right now, it's not very receptive of YAML front matter without writing it as plain text. In the index.jade file, that entails that I have to write the doctype line as regular html as opposed to Jade:

// output:index.html
|---
|---
<!doctype html>
html
    head

as opposed to

// output:index.html

---

---
doctype html
html
    head

The latter code, when saved, prompts a warning: "Assigning to rvalue (6:0) Assigning to rvalue (6:0)" and won't compile.

Also, I have to set pretty to false in order for the front matter not to be displayed—as it's supposed to—in the browser.

Really hope you can solve this. Sure, it's nitpicking, but it would make me a very happy camper.

Doesn't work with window:save-all

When editing multiple documents and then pressing Save All (command window:save-all) this package doesn't seems to execute, while normal Save (command core:save) does work.

Compile error

The compile process throws error when there is no locals data.

I can't make it work!

This is a bit embarrassing, but as much as I try, I can get compile neither jade file, and yep I am adding the output as a comment

For example:

//about.html
doctype html
html(lang='en')
  head

  body
    h1 Jade 

does not

it does not compile on save.

when is it supposed to?

Uncaught TypeError: Cannot read property 'classList' of null

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.0-beta5
System: Unknown Windows Version
Thrown From: jade-autocompile package, v0.6.5

Stack Trace

Uncaught TypeError: Cannot read property 'classList' of null

At C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\src\pane.js:829

TypeError: Cannot read property 'classList' of null
    at IconView.setNoCompiled (C:\Users\Brwin\.atom\packages\jade-autocompile\lib\jade-autocompile-view.js:67:7)
    at Object.compile (C:\Users\Brwin\.atom\packages\jade-autocompile\lib\jade-autocompile.js:105:20)
    at Object.handleSave (C:\Users\Brwin\.atom\packages\jade-autocompile\lib\jade-autocompile.js:98:17)
    at C:\Users\Brwin\.atom\packages\jade-autocompile\lib\jade-autocompile.js:162:17
    at Emitter.module.exports.Emitter.emit (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1060:27)
    at TextBuffer.module.exports.TextBuffer.save (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1030:19)
    at TextEditor.module.exports.TextEditor.save (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\src\text-editor.js:588:26)
    at Pane.module.exports.Pane.saveItem (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\src\pane.js:534:18)
    at Object.module.exports.autosavePaneItem (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\autosave\lib\autosave.js:64:21)
    at C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\autosave\lib\autosave.js:29:26
    at atom-pane.PaneElement.activeItemChanged (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\src\pane-element.js:152:25)
    at Emitter.module.exports.Emitter.emit (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at Pane.module.exports.Pane.setActiveItem (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\src\pane.js:248:22)
    at Pane.module.exports.Pane.activateItem (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\src\pane.js:316:21)
    at atom-tabs.TabBarView.onMouseDown (C:\Users\Brwin\AppData\Local\atom\app-1.3.0-beta5\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:670:19)

Commands

  6x -2:29.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:26 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -2:21.2.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:19.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  3x -1:34.6.0 linter:next-error (atom-workspace.workspace.scrollbars-visible-always.theme-atom-material-syntax.theme-atom-material-ui)
     -1:30.2.0 advanced-open-file:toggle (atom-text-editor.editor.is-focused)
     -1:25.3.0 core:backspace (atom-text-editor.path-input.editor.mini.is-focused)
     -1:24.6.0 core:confirm (atom-text-editor.path-input.editor.mini.is-focused)
  4x -1:20.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:17.2.0 snippets:expand (atom-text-editor.editor.is-focused)
     -1:17.2.0 emmet:expand-abbreviation-with-tab (atom-text-editor.editor.is-focused)
  2x -1:16.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:14.2.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -1:14.2.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:07.2.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ],
    "packagesWithKeymapsDisabled": [
      "advanced-open-file"
    ]
  }
}

Installed Packages

# User
advanced-open-file, v0.12.3
atom-beautify, v0.28.19
atom-jade, v0.3.0
atom-material-syntax, v0.2.4
atom-material-ui, v0.8.0
autocompile-jade, v0.0.1
autocomplete-html-entities, v0.1.0
color-picker, v2.0.13
emmet, v2.3.14
emmet-snippets-compatibility, v1.0.1
jade-autocompile, v0.6.5
jade-beautify, v0.0.11
linter, v1.11.2
linter-htmlhint, v0.2.1
linter-jade, v0.3.2
linter-sass-lint, v0.4.1
pigments, v0.19.0
sass-comment, v1.4.0
save-session, v0.15.7
snippets-jade, v0.1.1
space-tab, v0.4.2

# Dev
No dev packages

Failed to load the jade-autocompile package

[Enter steps to reproduce below:]

  1. just after fresh installation on Windows 7
  2. ...

Atom Version: 1.0.19
System: Unknown Windows Version
Thrown From: jade-autocompile package, v0.6.3

Stack Trace

Failed to load the jade-autocompile package

At Cannot find module 'loophole'

Error: Cannot find module 'loophole'
  at Module._resolveFilename (module.js:334:15)
  at Function.Module._resolveFilename (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\module-cache.js:383:52)
  at Function.Module._load (module.js:284:25)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at C:\Users\Михаил\.atom\packages\jade-autocompile\lib\jade-autocompile.js:6:18
  at Object.<anonymous> (C:\Users\Михаил\.atom\packages\jade-autocompile\lib\jade-autocompile.js:173:3)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .js] (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Package.module.exports.Package.requireMainModule (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:761:34)
  at C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:192:28
  at Package.module.exports.Package.measure (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:169:15)
  at Package.module.exports.Package.load (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:183:12)
  at PackageManager.module.exports.PackageManager.loadPackage (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package-manager.js:405:14)
  at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package-manager.js:485:30)
  at C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\settings-view\lib\package-manager.js:313:60
  at exit (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\settings-view\lib\package-manager.js:60:16)
  at triggerExitCallback (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\buffered-process.js:213:47)
  at C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\buffered-process.js:220:18
  at Socket.<anonymous> (C:\Users\Михаил\AppData\Local\atom\app-1.0.19\resources\app.asar\src\buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:169:7)
  at Pipe._onclose (net.js:467:12)

Commands

  4x -5:41.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -5:33.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  9x -5:32.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
atom-jade, v0.3.0
jade-autocompile, v0.6.3
language-jade, v0.6.2

# Dev
No dev packages

Uncaught Error: Notification must be created with string message: Error: ENOENT: no such file or ...

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.2
System: Microsoft Windows 8.1 Pro
Thrown From: jade-autocompile package, v0.8.2

Stack Trace

Uncaught Error: Notification must be created with string message: Error: ENOENT: no such file or directory, open 'E:\Work\NAGUEB\Personal\index.html
doctype html'

At C:\Users\Mostafa\AppData\Local\atom\app-1.3.2\resources\app.asar\src\notification.js:25

Error: Notification must be created with string message: Error: ENOENT: no such file or directory, open 'E:\Work\NAGUEB\Personal\index.html
  doctype html'
    at Notification.module.exports.Notification.validate (C:\Users\Mostafa\AppData\Local\atom\app-1.3.2\resources\app.asar\src\notification.js:25:15)
    at new Notification (C:\Users\Mostafa\AppData\Local\atom\app-1.3.2\resources\app.asar\src\notification.js:20:12)
    at NotificationManager.module.exports.NotificationManager.addError (C:\Users\Mostafa\AppData\Local\atom\app-1.3.2\resources\app.asar\src\notification-manager.js:41:35)
    at writeFile (C:\Users\Mostafa\.atom\packages\jade-autocompile\lib\jade-autocompile.js:172:30)
    at fs.js:1149:21
    at FSReqWrap.oncomplete (fs.js:82:15)

Commands

  9x -1:15.4.0 core:move-right (atom-text-editor.editor.is-focused)
  6x -1:12.7.0 core:select-right (atom-text-editor.editor.is-focused)
     -1:08.4.0 core:save (atom-text-editor.editor.is-focused)
     -0:59 tree-view:open-selected-entry-down (li.file.entry.list-item.selected)
     -0:37.9.0 tree-view:remove (span.name.icon.icon-file-text)
  2x -0:26 core:save (atom-text-editor.editor.is-focused)
     -0:19.8.0 tree-view:open-selected-entry-right (li.file.entry.list-item.selected)
     -0:15 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:14.8.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:14.8.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:14.8.0 editor:indent (atom-text-editor.editor.is-focused)
     -0:13.2.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:12.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:08.2.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:07.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:06.3.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
jade-autocompile, v0.8.2
sass-autocompile, v0.12.2

# Dev
No dev packages

Save all in different folders

When Jade files are in different folders the current opened file path is used to as root folder to store other files too.

Steps to reproduce:

  1. Open an Jade file file1.jade in folder folder1 and make an edit (without saving).
  2. Open an Jade file file2.jade in folder folder2 and make an edit (without saving).
  3. Execute Save All command.
  4. See file1.jade appear in folder2 instead of folder1.

Atom 1.3.2
jade-autocompile 0.8.1

Cannot apply transform markdown

Have been looking around for markdown-js and whilst I have found it (https://github.com/evilstreak/markdown-js) and attempted to install it to the best of my abilities, the compiler still throws an error:

In order to apply the transform markdown you must install one of "marked","supermarked","markdown-js","markdown"

I have restarted my PC (and therefore the programme) and I had installed it whilst it was not running.

How would I install it?

Object.extname is deprecated.

Argument to path.extname must be a string

Object.extname (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:20:10)
Object.toggle (/Users/joaosaro/.atom/packages/jade-autocompile/lib/jade-autocompile.js:208:28)
<unknown> (/Users/joaosaro/.atom/packages/jade-autocompile/lib/jade-autocompile.js:75:15)
Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:348:27)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.