├── dmg_bg.ai ├── icons.psd ├── dmg_icon.psd ├── assets-osx ├── icon.icns ├── dmg_bg.png ├── README.md ├── dmg_bg@2x.png ├── dmg_icon.icns └── dmg.json ├── assets-windows ├── icon.ico └── README.md ├── src ├── app │ ├── assets │ │ ├── img │ │ │ ├── icons.png │ │ │ ├── koala.ico │ │ │ ├── koala.png │ │ │ ├── koala.tiff │ │ │ ├── loading.gif │ │ │ ├── addfolder.png │ │ │ └── filetypes │ │ │ │ ├── js.png │ │ │ │ ├── css.png │ │ │ │ ├── less.png │ │ │ │ ├── sass.png │ │ │ │ ├── scss.png │ │ │ │ └── coffee.png │ │ ├── fonts │ │ │ ├── Ubuntu.woff │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── less │ │ │ ├── _util.less │ │ │ ├── koala-config.json │ │ │ ├── log.less │ │ │ ├── koalaui.less │ │ │ ├── notifier.less │ │ │ └── settings.less │ │ ├── test │ │ │ └── notifier.html │ │ ├── css │ │ │ ├── log.css │ │ │ ├── notifier.css │ │ │ ├── koalaui.css │ │ │ └── settings.css │ │ └── libs │ │ │ ├── jquery.koalaui.js │ │ │ └── jquery.hotkeys.js │ ├── views │ │ ├── template │ │ │ ├── main │ │ │ │ ├── folders.jade │ │ │ │ ├── files.jade │ │ │ │ └── settings.jade │ │ │ ├── notifier.html │ │ │ ├── settings.html │ │ │ ├── log.html │ │ │ └── main.html │ │ └── release │ │ │ ├── log.html │ │ │ ├── settings.html │ │ │ └── notifier.html │ ├── scripts │ │ ├── pages │ │ │ ├── main │ │ │ │ ├── init.js │ │ │ │ ├── windows.js │ │ │ │ └── filelist.js │ │ │ └── log.js │ │ ├── il8n.js │ │ ├── main.js │ │ ├── fileTypesManager.js │ │ ├── Compiler.js │ │ ├── storage.js │ │ ├── patch.js │ │ ├── notifier.js │ │ ├── windowEvents.js │ │ ├── compilers │ │ │ ├── common.js │ │ │ └── CssCompiler.js │ │ ├── appConfigManager.js │ │ └── FileManager.js │ ├── locales │ │ ├── ko_kr │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── fi_fi │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── ru_ru │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── fa_IR │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── ja_jp │ │ │ ├── package.json │ │ │ ├── views.json │ │ │ └── context.json │ │ ├── de_de │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── zh_cn │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── zh_tw │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── en_us │ │ │ ├── package.json │ │ │ ├── views.json │ │ │ └── context.json │ │ ├── fr_fr │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── pl_pl │ │ │ ├── package.json │ │ │ ├── views.json │ │ │ └── context.json │ │ ├── es_mx │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── it_it │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ ├── pt_br │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ └── repositories.json │ ├── templates │ │ ├── locales │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── context.json │ │ │ └── views.json │ │ └── compiler │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── koala-config-of-mycompiler.json │ │ │ └── MyCompiler.js │ ├── settings │ │ ├── koala-config-of-default.json │ │ ├── koala-config-of-coffee.json │ │ ├── koala-config-of-less.json │ │ └── koala-config-of-sass.json │ └── main.html ├── bin │ ├── sass │ └── compass └── package.json ├── assets-linux ├── icons │ └── hicolor │ │ ├── 16x16 │ │ └── apps │ │ │ └── koala.png │ │ ├── 22x22 │ │ └── apps │ │ │ └── koala.png │ │ ├── 24x24 │ │ └── apps │ │ │ └── koala.png │ │ ├── 32x32 │ │ └── apps │ │ │ └── koala.png │ │ ├── 48x48 │ │ └── apps │ │ │ └── koala.png │ │ ├── 64x64 │ │ └── apps │ │ │ └── koala.png │ │ └── 128x128 │ │ └── apps │ │ └── koala.png ├── README.md ├── after-remove.sh ├── after-install.sh └── koala.desktop ├── .github └── ISSUE_TEMPLATE.md ├── AUTHORS ├── .jshintrc ├── install.sh ├── .gitignore ├── LICENSE ├── package.json ├── TODO.md └── README.md /dmg_bg.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/dmg_bg.ai -------------------------------------------------------------------------------- /icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/icons.psd -------------------------------------------------------------------------------- /dmg_icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/dmg_icon.psd -------------------------------------------------------------------------------- /assets-osx/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-osx/icon.icns -------------------------------------------------------------------------------- /assets-osx/dmg_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-osx/dmg_bg.png -------------------------------------------------------------------------------- /assets-windows/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-windows/icon.ico -------------------------------------------------------------------------------- /assets-osx/README.md: -------------------------------------------------------------------------------- 1 | # OS X related assets 2 | 3 | - `dmg.json` config file for node-appdmg 4 | -------------------------------------------------------------------------------- /assets-osx/dmg_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-osx/dmg_bg@2x.png -------------------------------------------------------------------------------- /assets-osx/dmg_icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-osx/dmg_icon.icns -------------------------------------------------------------------------------- /assets-windows/README.md: -------------------------------------------------------------------------------- 1 | # Windows related assets 2 | 3 | - `installer.nsi` config file for nsis 4 | -------------------------------------------------------------------------------- /src/app/assets/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/icons.png -------------------------------------------------------------------------------- /src/app/assets/img/koala.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/koala.ico -------------------------------------------------------------------------------- /src/app/assets/img/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/koala.png -------------------------------------------------------------------------------- /src/app/assets/img/koala.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/koala.tiff -------------------------------------------------------------------------------- /src/app/assets/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/loading.gif -------------------------------------------------------------------------------- /src/app/assets/fonts/Ubuntu.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/fonts/Ubuntu.woff -------------------------------------------------------------------------------- /src/app/assets/img/addfolder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/addfolder.png -------------------------------------------------------------------------------- /src/app/assets/img/filetypes/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/filetypes/js.png -------------------------------------------------------------------------------- /src/app/assets/img/filetypes/css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/filetypes/css.png -------------------------------------------------------------------------------- /src/app/assets/img/filetypes/less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/filetypes/less.png -------------------------------------------------------------------------------- /src/app/assets/img/filetypes/sass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/filetypes/sass.png -------------------------------------------------------------------------------- /src/app/assets/img/filetypes/scss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/filetypes/scss.png -------------------------------------------------------------------------------- /src/app/assets/img/filetypes/coffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/img/filetypes/coffee.png -------------------------------------------------------------------------------- /src/app/views/template/main/folders.jade: -------------------------------------------------------------------------------- 1 | each item in folders 2 | li(data-src=item.src, data-id=item.id, id=item.id)= item.name -------------------------------------------------------------------------------- /src/app/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/app/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/app/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/src/app/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/16x16/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/16x16/apps/koala.png -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/22x22/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/22x22/apps/koala.png -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/24x24/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/24x24/apps/koala.png -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/32x32/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/32x32/apps/koala.png -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/48x48/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/48x48/apps/koala.png -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/64x64/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/64x64/apps/koala.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Koala version** 2 | 3 | **Bug report or feature request?** 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets-linux/icons/hicolor/128x128/apps/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oklai/koala/HEAD/assets-linux/icons/hicolor/128x128/apps/koala.png -------------------------------------------------------------------------------- /assets-linux/README.md: -------------------------------------------------------------------------------- 1 | # Linux related assets 2 | 3 | - `after-install` and `after-remove` scripts 4 | - `starter.desktop` and icons for launchers 5 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Ethan Lai 2 | 3 | # Thanks for project UI design: 4 | 5 | Max Deng 6 | Leott Liu -------------------------------------------------------------------------------- /assets-linux/after-remove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Link to the binary 4 | rm -f /usr/local/bin/koala 5 | 6 | # Launcher files 7 | rm -f /usr/share/applications/koala.desktop 8 | -------------------------------------------------------------------------------- /src/app/views/template/notifier.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 |

5 |
-------------------------------------------------------------------------------- /assets-linux/after-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Link to the binary 4 | ln -sf /usr/share/koala/Koala /usr/local/bin/koala 5 | 6 | # Launcher icon 7 | desktop-file-install /usr/share/koala/koala.desktop 8 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "es5": true, 4 | "browser": true, 5 | "asi": true, 6 | "curly": false, 7 | "immed": true, 8 | "smarttabs": true, 9 | "strict": false, 10 | "jquery": true 11 | } -------------------------------------------------------------------------------- /src/app/assets/less/_util.less: -------------------------------------------------------------------------------- 1 | .bgGradient (@start, @end) { 2 | background: -webkit-linear-gradient(top, @start 0%,@end 100%); 3 | } 4 | 5 | .flexbox { 6 | display: -webkit-box; 7 | -webkit-box-orient: horizontal; 8 | } -------------------------------------------------------------------------------- /src/app/scripts/pages/main/init.js: -------------------------------------------------------------------------------- 1 | /** 2 | * main page dom events init 3 | */ 4 | 5 | 'use strict'; 6 | 7 | require('./project.js'); 8 | require('./filelist.js'); 9 | require('./options.js'); 10 | require('./windows.js'); -------------------------------------------------------------------------------- /src/app/locales/ko_kr/README.md: -------------------------------------------------------------------------------- 1 | The language pack template files: 2 | 3 | * package.json 4 | * context.json 5 | * view.json 6 | 7 | [How to create a language pack?](https://github.com/oklai/koala/wiki/How-to-create-a-language-pack%3F) -------------------------------------------------------------------------------- /src/app/templates/locales/README.md: -------------------------------------------------------------------------------- 1 | The language pack template files: 2 | 3 | * package.json 4 | * context.json 5 | * view.json 6 | 7 | [How to create a language pack?](https://github.com/oklai/koala/wiki/How-to-create-a-language-pack%3F) -------------------------------------------------------------------------------- /assets-linux/koala.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Koala 3 | Version=1.0 4 | Exec=koala 5 | Comment=A cool tool for web developers 6 | Icon=koala 7 | Type=Application 8 | Terminal=false 9 | StartupNotify=true 10 | Encoding=UTF-8 11 | Categories=Development;GTK;GNOME; -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd `dirname $0`/src 4 | 5 | # install node_modules 6 | npm install 7 | 8 | # install ruby gems 9 | gem update -i rubygems 10 | gem install -i rubygems compass -v '= 1.0.3' 11 | gem install -i rubygems sass -v '= 3.5.2' 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /src/app/templates/compiler/README.md: -------------------------------------------------------------------------------- 1 | These files must contain at least in the compiler pack: 2 | 3 | * package.json 4 | * MyCompilerName.js 5 | * path-to-icon/compilerName.png 6 | 7 | [How to create a compiler extension?](https://github.com/oklai/koala/wiki/How-to-create-a-compiler-extension%3F) -------------------------------------------------------------------------------- /src/app/locales/fi_fi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Suomi", 3 | "languageCode": "fi_fi", 4 | 5 | "translator": { 6 | "name": "4D48", 7 | "email": "me@4d48.tk" 8 | 9 | }, 10 | 11 | "koalaVersion": ">=2.0.2", 12 | 13 | "updatedDate": "2017-11-19" 14 | } 15 | -------------------------------------------------------------------------------- /src/app/locales/ru_ru/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Русский", 3 | "languageCode": "ru_ru", 4 | 5 | "translator": { 6 | "name": " Юрий Меркушин", 7 | "email": "yurimerkushin@gmail.com" 8 | 9 | }, 10 | 11 | "koalaVersion": ">=2.0.2", 12 | 13 | "updatedDate": "2014-04-02" 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | *.sublime-project 3 | *.sublime-workspace 4 | *.map 5 | .idea 6 | 7 | nw 8 | nw.pak 9 | 10 | test 11 | tests 12 | benchmark 13 | example 14 | extra 15 | build 16 | cache 17 | dist 18 | 19 | node_modules 20 | src/.sass-cache 21 | src/node-webkit.app 22 | src/ruby 23 | src/rubygems 24 | -------------------------------------------------------------------------------- /src/app/locales/fa_IR/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Persian", 3 | "languageCode": "fa_IR", 4 | 5 | "translator": { 6 | "name": " محمد علی حصاریان", 7 | "email": "iam@alihesarian.ir", 8 | "web": "http://alihesarian.ir" 9 | }, 10 | 11 | "koalaVersion": ">=2.0.0", 12 | 13 | "updatedDate": "2015-9-18" 14 | } 15 | -------------------------------------------------------------------------------- /src/app/locales/ja_jp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "日本語", 3 | 4 | "languageCode": "ja_jp", 5 | 6 | "version": "1.0.0", 7 | 8 | "translator": { 9 | "name": "Sou-Lab", 10 | "email": "", 11 | "web": "http://sou-lab.com" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2013-07-10" 17 | } -------------------------------------------------------------------------------- /src/app/views/template/settings.html: -------------------------------------------------------------------------------- 1 |

2 | {{Settings}} 3 | × 4 |

5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 |
-------------------------------------------------------------------------------- /assets-osx/dmg.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Koala", 3 | "icon": "dmg_icon.icns", 4 | "background": "dmg_bg.png", 5 | "icon-size": 80, 6 | "contents": [ 7 | { "x": 448, "y": 344, "type": "link", "path": "/Applications" }, 8 | { "x": 192, "y": 344, "type": "file", "path": "../build/Koala/osx64/Koala.app" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /src/app/locales/de_de/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Deutsch", 3 | "languageCode": "de_de", 4 | 5 | "translator": { 6 | "name": " Sebastian Klaus", 7 | "email": "sebastian@klaus.com.au", 8 | "web": "http://sebastian.klaus.com.au" 9 | }, 10 | 11 | "koalaVersion": ">=2.0.0", 12 | 13 | "updatedDate": "2013-12-18" 14 | } -------------------------------------------------------------------------------- /src/app/locales/zh_cn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "简体中文", 3 | 4 | "languageCode": "zh_cn", 5 | 6 | "version": "1.0.0", 7 | 8 | "translator": { 9 | "name": "Official", 10 | "email": "lain.z.q@gmail.com", 11 | "web": "http://koala-app.com" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2013-07-07" 17 | } -------------------------------------------------------------------------------- /src/app/locales/zh_tw/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "正體中文", 3 | 4 | "languageCode": "zh_tw", 5 | 6 | "version": "1.0.0", 7 | 8 | "translator": { 9 | "name": "香腸", 10 | "email": "s9011514@gmail.com", 11 | "web": "http://sofree.cc" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2013-08-07" 17 | } 18 | -------------------------------------------------------------------------------- /src/app/locales/en_us/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "English", 3 | 4 | "languageCode": "en_us", 5 | 6 | "version": "1.0.0", 7 | 8 | "translator": { 9 | "name": "Official", 10 | "email": "lain.z.q@gmail.com", 11 | "web": "http://koala-app.com" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2013-07-07" 17 | } -------------------------------------------------------------------------------- /src/app/locales/fr_fr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Français", 3 | 4 | "languageCode": "fr_fr", 5 | 6 | "version": "2.0.0", 7 | 8 | "translator": { 9 | "name": "Youcef Mammar", 10 | "email": "y.mammar@gmail.com", 11 | "web": "ymammar.com" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2013-08-20" 17 | } 18 | -------------------------------------------------------------------------------- /src/app/locales/pl_pl/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Polish", 3 | 4 | "languageCode": "pl_pl", 5 | 6 | "version": "1.0.0", 7 | 8 | "translator": { 9 | "name": "Grzegorz Miskiewicz", 10 | "email": "biuro@avatec.pl", 11 | "web": "http://www.avatec.pl" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2017-10-25" 17 | } -------------------------------------------------------------------------------- /src/app/locales/es_mx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Spanish", 3 | 4 | "languageCode": "es_mx", 5 | 6 | "version": "2.0.0", 7 | 8 | "translator": { 9 | "name": "Marte Baquerizo", 10 | "email": "martemorfosis@gmail.com", 11 | "web": "http://www.martemorfosis.com" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2013-08-24" 17 | } -------------------------------------------------------------------------------- /src/app/locales/it_it/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Italiano", 3 | 4 | "languageCode": "it_it", 5 | 6 | "version": "2.0.0", 7 | 8 | "translator": { 9 | "name": "Daniele Veneroni", 10 | "email": "daniele.veneroni@about.me", 11 | "web": "http://venerons.github.io/" 12 | }, 13 | 14 | "koalaVersion": ">=2.0.0", 15 | 16 | "updatedDate": "2014-04-20" 17 | } 18 | -------------------------------------------------------------------------------- /src/app/locales/pt_br/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "Português Brasileiro", 3 | 4 | "languageCode": "pt_br", 5 | 6 | "version": "1.4.1", 7 | 8 | "translator": { 9 | "name": "Vinícius Belmonte", 10 | "email": "vinigordex@gmail.com", 11 | "web": "http://twitter.com/vinigordex" 12 | }, 13 | 14 | "koalaVersion": ">=1.4.1", 15 | 16 | "updatedDate": "2013-08-15" 17 | } -------------------------------------------------------------------------------- /src/app/templates/locales/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "", // The language name. 3 | "languageCode": "", // Language code. e.g "en_us". 4 | 5 | // The translator info. 6 | "translator": { 7 | "name": "", 8 | "email": "", 9 | "web": "" 10 | }, 11 | 12 | "koalaVersion": "", // Corresponding koala version. 13 | 14 | "updatedDate": "" // Updated date, format: yyyy-MM-dd. 15 | } -------------------------------------------------------------------------------- /src/app/views/template/main/files.jade: -------------------------------------------------------------------------------- 1 | each item in files 2 | classList = 'type_' + item.category + (item.compile ? '' : ' disable') + (item.watch ? ' watch' : ' nowatch') 3 | li.file_item(class=classList, data-src=item.src, data-type=item.type, data-pid=item.pid, data-id=item.id, id=item.id) 4 | img.icon(src=item.icon) 5 | h3.name= item.shortSrc 6 | p.output 7 | button.custom_button.changeOutput change 8 | span= item.shortOutput -------------------------------------------------------------------------------- /src/app/views/release/log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Koala - Log 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/app/views/template/log.html: -------------------------------------------------------------------------------- 1 |

2 | {{Error Log}} 3 | × 4 |

5 |
6 |
7 |
8 |
  • 9 |

    {file}{date}

    10 |
    {message}
    11 |
  • 12 |
    13 |
      14 |
      15 |
      16 | -------------------------------------------------------------------------------- /src/app/templates/compiler/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo", 3 | 4 | "display": "MyCompiler", 5 | 6 | "version": "1.0.0", 7 | 8 | "koalaVersion": ">=2.0.0", 9 | 10 | "main": "MyCompiler.js", 11 | 12 | "fileTypes": [{ 13 | "extension": "", 14 | 15 | "output": "", 16 | 17 | "icon": "", 18 | 19 | "category": "" 20 | }], 21 | 22 | "options": [], 23 | 24 | "advanced": [], 25 | 26 | "projectSettings": "", 27 | 28 | "libraries": [] 29 | } -------------------------------------------------------------------------------- /src/app/locales/ko_kr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "languageName": "한국어", // The language name. 3 | "languageCode": "ko_kr", // Language code. e.g "en_us". 4 | 5 | // The translator info. 6 | "translator": { 7 | "name": "서버지기", 8 | "email": "mko45733@gmail.com", 9 | "web": "https://ani.one" 10 | }, 11 | 12 | "koalaVersion": "2.2.0", // Corresponding koala version. 13 | 14 | "updatedDate": "2017-07-06" // Updated date, format: yyyy-MM-dd. 15 | } -------------------------------------------------------------------------------- /src/bin/sass: -------------------------------------------------------------------------------- 1 | PATH_TO_GEMS = File.join File.dirname(__FILE__), "../rubygems" 2 | 3 | Gem.paths = { 4 | 'GEM_HOME' => PATH_TO_GEMS, 5 | 'GEM_PATH' => PATH_TO_GEMS 6 | } 7 | 8 | require 'rubygems' 9 | 10 | version = ">= 0" 11 | 12 | if ARGV.first 13 | str = ARGV.first 14 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 15 | if str =~ /\A_(.*)_\z/ 16 | version = $1 17 | ARGV.shift 18 | end 19 | end 20 | 21 | gem 'sass', version 22 | load Gem.bin_path('sass', 'sass', version) 23 | -------------------------------------------------------------------------------- /src/bin/compass: -------------------------------------------------------------------------------- 1 | PATH_TO_GEMS = File.join File.dirname(__FILE__), "../rubygems" 2 | 3 | Gem.paths = { 4 | 'GEM_HOME' => PATH_TO_GEMS, 5 | 'GEM_PATH' => PATH_TO_GEMS 6 | } 7 | 8 | require 'rubygems' 9 | 10 | version = ">= 0" 11 | 12 | if ARGV.first 13 | str = ARGV.first 14 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 15 | if str =~ /\A_(.*)_\z/ 16 | version = $1 17 | ARGV.shift 18 | end 19 | end 20 | 21 | gem 'compass', version 22 | load Gem.bin_path('compass', 'compass', version) 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Ethan Lai 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /src/app/templates/compiler/koala-config-of-mycompiler.json: -------------------------------------------------------------------------------- 1 | // Project settings, you can edit it and set custom settings. 2 | { 3 | // The mappings of source directory and output directory 4 | "mappings": [ 5 | // { 6 | // "src": "path/to/source", 7 | // "dest": "path/to/output" 8 | // } 9 | ], 10 | 11 | // Add the ignore rules that Koala will not search them. 12 | // e.g. ["*.json", "*.txt", "test", "path/libs"] 13 | "ignores": [], 14 | 15 | // Options of Compilers. 16 | "options": { 17 | // "key": "val", 18 | // "key2": "val2" 19 | // ... 20 | } 21 | 22 | // ... More Settings ... 23 | } -------------------------------------------------------------------------------- /src/app/views/release/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Koala - Settings 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/app/templates/compiler/MyCompiler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My compiler 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var FileManager = global.getFileManager(), 8 | Compiler = require(FileManager.appScriptsDir + '/Compiler.js'); 9 | 10 | /** 11 | * My Compiler 12 | * @param {object} config compiler config 13 | */ 14 | function MyCompiler(config) { 15 | Compiler.call(this, config); 16 | } 17 | require('util').inherits(MyCompiler, Compiler); 18 | 19 | module.exports = MyCompiler; 20 | 21 | /** 22 | * compile file 23 | * @param {Object} file compile file object 24 | * @param {Object} emitter compile event emitter 25 | */ 26 | MyCompiler.prototype.compile = function (file, emitter) { 27 | // TODO 28 | } -------------------------------------------------------------------------------- /src/app/settings/koala-config-of-default.json: -------------------------------------------------------------------------------- 1 | // Default project settings, you can edit it and set custom settings. 2 | { 3 | // The mappings of source directory and output directory 4 | "mappings": [ 5 | // { 6 | // "src": "path/to/source", 7 | // "dest": "path/to/output" 8 | // } 9 | ], 10 | 11 | // Add the ignore rules that Koala will not search them. 12 | // e.g. ["*.json", "*.txt", "test", "path/libs"] 13 | "ignores": [], 14 | 15 | // Options of Compilers. 16 | "options": { 17 | // "key": "val", 18 | // "key2": "val2" 19 | // ... 20 | }, 21 | 22 | // An array of filesystem paths which should be searched for js/LESS/Sass templates imported with the @import/@append/@prepend directive. 23 | "includePaths": [] 24 | } -------------------------------------------------------------------------------- /src/app/locales/en_us/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // setting.html 4 | "compass project configuration instructions" : "Just edit the config.rb file under the project directory. If the directory doesn't have this file, you can create one according to the following: right-click project item --> project settings --> new settings --> for compass. If the config.rb file is in another directory, move it to the root directory of the project and modify the \"http_path\" attributes.", 5 | 6 | "new version available": "Koala v now available,", 7 | 8 | // jadetmpl.html 9 | "auto compile": "Auto Compile", 10 | 11 | "[@jadetmpl.html]options:": "Options:", 12 | 13 | "[@jadetmpl.html]compile": "Compile" 14 | } -------------------------------------------------------------------------------- /src/app/locales/pl_pl/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // setting.html 4 | "compass project configuration instructions" : "Edytuj plik config.rb znajdujący się w katalogu projektu. Jeżeli w katalogu nie znajduje się ten plik, możesz go utworzyć postępując następująco: prawy klik myszy na projekcie --> ustawienia projektu --> nowe ustawienia - > dla compass. Jeżeli plik config.rb znajduje się w innym katalogu, przenieś go do głównego katalogu projektu i zmodyfikuj atrybut \"http_path\".", 5 | 6 | "new version available": "Koala v jest dostępna,", 7 | 8 | // jadetmpl.html 9 | "auto compile": "Automatycznie kompiluj", 10 | 11 | "[@jadetmpl.html]options:": "Opcje:", 12 | 13 | "[@jadetmpl.html]compile": "Kompiluj" 14 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "koala", 3 | "version": "2.3.0", 4 | "description": "[![Join the chat at https://gitter.im/oklai/koala](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/oklai/koala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)", 5 | "main": "index.js", 6 | "dependencies": { 7 | "gulp": "^3.8.11", 8 | "gulp-appdmg": "^1.0.2", 9 | "gulp-node-webkit-builder": "^1.1.1", 10 | "merge-stream": "^1.0.1", 11 | "nw-builder": "^3.5.1", 12 | "run-sequence": "^2.2.0", 13 | "shelljs": "^0.7.8" 14 | }, 15 | "devDependencies": {}, 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/oklai/koala.git" 19 | }, 20 | "author": "", 21 | "license": "ISC", 22 | "bugs": { 23 | "url": "https://github.com/oklai/koala/issues" 24 | }, 25 | "homepage": "https://github.com/oklai/koala#readme" 26 | } 27 | -------------------------------------------------------------------------------- /src/app/assets/test/notifier.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Koala - Compile Notification 6 | 7 | 8 | 13 | 14 | 15 |
      16 |

      17 | Success 18 | 19 |

      20 |
      21 |
      /home/ethanlai/Workspaces/home/ethanlai/Workspaces/notifier.html
      22 |
      23 |
      24 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/settings/koala-config-of-coffee.json: -------------------------------------------------------------------------------- 1 | // CoffeeScript project settings, you can edit it and set custom settings. 2 | { 3 | // The mappings of source directory and output directory 4 | "mappings": [ 5 | // { 6 | // "src": "path/to/source", 7 | // "dest": "path/to/output" 8 | // } 9 | ], 10 | 11 | // Add the ignore rules that Koala will not search them. 12 | // e.g. ["*.json", "*.txt", "test", "path/libs"] 13 | "ignores": ["*.js"], 14 | 15 | // Compile options of CoffeeScript. 16 | "options": { 17 | // Compile without a top-level function wrapper. 18 | "bare": false, 19 | 20 | // Treat stdio as literate style coffee-script. 21 | "literate": false, 22 | 23 | // generate source map and save as .map files 24 | "sourceMap": false 25 | }, 26 | 27 | // Other compile options, use the full name of options. 28 | // e.g, ["--map", ...]. 29 | // Run the command 'sass -h' to see more options. 30 | "customOptions": [] 31 | } -------------------------------------------------------------------------------- /src/app/locales/repositories.json: -------------------------------------------------------------------------------- 1 | { 2 | "languages": [ 3 | { 4 | "name": "English", // The language name. 5 | "code": "en_us" // Language code. e.g "en_us". 6 | }, 7 | { 8 | "name": "简体中文", 9 | "code": "zh_cn" 10 | }, 11 | { 12 | "name": "正體中文", 13 | "code": "zh_tw" 14 | }, 15 | { 16 | "name": "日本語", 17 | "code": "ja_jp" 18 | }, 19 | { 20 | "name": "Deutsch", 21 | "code": "de_de" 22 | }, 23 | { 24 | "name": "Français", 25 | "code": "fr_fr" 26 | }, 27 | { 28 | "name": "Português Brasileiro", 29 | "code": "pt_br" 30 | }, 31 | { 32 | "name": "Spanish", 33 | "code": "es_mx" 34 | }, 35 | { 36 | "name": "Русский", 37 | "code": "ru_ru" 38 | }, 39 | { 40 | "name": "Italiano", 41 | "code": "it_it" 42 | }, 43 | { 44 | "name": "Persian", 45 | "code": "fa_IR" 46 | }, 47 | { 48 | "name": "Polish", 49 | "code": "pl_pl" 50 | }, 51 | { 52 | "name": "Suomi", 53 | "code": "fi_fi" 54 | } 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /src/app/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Koala - a cool tool for web developers 6 | 7 | 8 | 9 |
      10 | 11 |
      12 | 13 |
      14 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/views/release/notifier.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Koala - Notification 6 | 7 | 8 | 9 | 35 | 36 | -------------------------------------------------------------------------------- /src/app/locales/en_us/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | "Exit": "Quit", 4 | 5 | // tips 6 | "New Version Found": "New version found v${1}, do you want to download it now?", 7 | 8 | "Some Compile errors, please see the compile log": "Some file compile errors, please see the compile log.
      ${1} succeeded, ${2} failed.", 9 | 10 | "x new file": "${1} new file", 11 | 12 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} was created in the project directory.
      Do you want to edit it now?", 13 | 14 | "Settings file has already exists. Do you want to edit it?": "${1} has already exists. Do you want to edit it?", 15 | 16 | "Language pack is installed successfully.": "${1} Language pack has installed successfully.", 17 | 18 | "language pack update notification": "The language pack you are using has been updated, do you want to update it now?", 19 | 20 | "Package is not complete": "Package is not complete, these fields are missing: ${1}", 21 | 22 | "Compiler pack is installed successfully.": "\"${1}\" compiler is installed successfully.", 23 | 24 | "compiler pack update notification": "New version found of these compilers.
      ${1}" 25 | } -------------------------------------------------------------------------------- /src/app/scripts/il8n.js: -------------------------------------------------------------------------------- 1 | /** 2 | * locales message services 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var fs = require('fs'), 8 | util = require('./util.js'), 9 | appConfig = require('./appConfigManager.js').getAppConfig(), 10 | locales = appConfig.locales, 11 | localStorage = global.localStorage; 12 | 13 | /** 14 | * get message of current language 15 | * @param {String} id message id 16 | * @return {String} message 17 | */ 18 | exports.__ = function (id) { 19 | var message = '', 20 | data = util.parseJSON(localStorage.getItem('localesContent')) || {}, 21 | defaultData = {}; 22 | 23 | // get default data if the locales pack not is built-in pack 24 | if (appConfig.builtInLanguages.indexOf(locales) === -1) { 25 | defaultData = util.parseJSON(localStorage.getItem('defaultLocalesContent')) || {}; 26 | } 27 | 28 | message = data[id] || defaultData[id] || id; 29 | if (message && arguments.length) { 30 | for (var i = 1; i < arguments.length; i++) { 31 | message = message.replace('${' + i + '}', arguments[i]); 32 | } 33 | } 34 | 35 | return message; 36 | }; 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/app/views/template/main/settings.jade: -------------------------------------------------------------------------------- 1 | input(type="hidden", name="pid", value=file.pid) 2 | input(type="hidden", name="src", value=file.src) 3 | input(type="hidden", name="id", value=file.id) 4 | 5 | div 6 | h3.type(data-type=compilerName) 7 | h4.targetName= file.name 8 | 9 | if file.watch 10 | label 11 | input(type="checkbox",class="compileStatus",checked=file.compile) 12 | span {{auto compile}} 13 | 14 | mixin args_checkbox(option) 15 | label 16 | input(type="checkbox", class=option.name, data-option-name=option.name, checked=file.settings[option.name]) 17 | span= __(option.display) 18 | 19 | mixin args_droplist(option) 20 | label= __(option.display) + ': ' 21 | select(class=option.name, data-option-name=option.name) 22 | each item in option.items 23 | option(value=item.value, selected=option.value === item.value)= __(item.text) 24 | 25 | div.option_args 26 | if options.length > 0 27 | h3.title {{[@jadetmpl.html]options:}} 28 | each option in options 29 | if option.type === "checkbox" 30 | mixin args_checkbox(option) 31 | 32 | if option.type === "droplist" 33 | mixin args_droplist(option) 34 | 35 | footer 36 | button(class="compileManually") {{[@jadetmpl.html]compile}} -------------------------------------------------------------------------------- /src/app/locales/pl_pl/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | "Exit": "Wyjście", 4 | 5 | // tips 6 | "New Version Found": "Nowa wersja v${1} jest dostępna, czy chcesz ją teraz pobrać ?", 7 | 8 | "Some Compile errors, please see the compile log": "Wystąpiły błędy kompilacji. Możesz je przejrzeć w pliku log.
      ${1} sukces, ${2} niepowodzenie.", 9 | 10 | "x new file": "${1} nowy plik", 11 | 12 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} został utworzony w katalogu projektu.
      Czy chcesz go teraz edytować?", 13 | 14 | "Settings file has already exists. Do you want to edit it?": "${1} już istnieje. Czy chcesz go teraz edytować?", 15 | 16 | "Language pack is installed successfully.": "${1} Paczka językowa została pomyślnie zainstalowana.", 17 | 18 | "language pack update notification": "Pakiet językowy, którego używasz został zaktualizowany, czy chcesz go teraz zainstalować?", 19 | 20 | "Package is not complete": "Paczka nie jest kompletna, brakujące pola: ${1}", 21 | 22 | "Compiler pack is installed successfully.": "\"${1}\" kompilator został zainstalowany pomyślnie.", 23 | 24 | "compiler pack update notification": "Dostępna nowa wersja poniższych kompilatorów.
      ${1}" 25 | } -------------------------------------------------------------------------------- /src/app/assets/less/koala-config.json: -------------------------------------------------------------------------------- 1 | // The LESS settings file of koala project. You can edit it and set custom settings. 2 | { 3 | "language": "less", 4 | 5 | // Set this to the root of your project. Defaults to "/". 6 | "http_path": "/", 7 | 8 | // The directory where the less stylesheets are kept. It is relative to the http_path. 9 | "less_dir":".", 10 | 11 | // The directory where the css stylesheets are kept. It is relative to the http_path. 12 | "css_dir": "../css", 13 | 14 | // Compile options of LESS. 15 | "options": { 16 | 17 | // Output style. Can be normal (default), compress, yuicompress. 18 | "output_style": "normal", 19 | 20 | // Outputs filename and line numbers, which will output the debug info within comments. 21 | "line_comments": true, 22 | 23 | // Outputs filename and line numbers, which will output the information within a fake media query which is compatible with the SASS format. 24 | "debug_info": false 25 | }, 26 | 27 | // Other compile options. 28 | // e.g, ["--strict-imports", ... ,"--rootpath=URL"]. 29 | // Run the command 'lessc -h' to see more options. 30 | "custom_options": [], 31 | 32 | // An array of filesystem paths or importers which should be searched for LESS templates imported with the @import directive. 33 | "include_paths": [] 34 | } -------------------------------------------------------------------------------- /src/app/scripts/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * main.js 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var path = require('path'), 8 | fs = require('fs'), 9 | FileManager = require('./scripts/FileManager'); 10 | 11 | //Add error event listener 12 | process.on('uncaughtException', function (err) { 13 | var message = '---uncaughtException---\n' + err.stack + '\n\n'; 14 | fs.appendFile(FileManager.errorLogFile, message); 15 | jQuery('.koalaui-loading,.koalaui-overlay').remove(); 16 | window.alert(message); 17 | }); 18 | 19 | window.addEventListener('error', function (err) { 20 | var message = '---error---\n' + err.filename + ':' + err.lineno + '\n' + err.message + '\n\n'; 21 | fs.appendFile(FileManager.errorLogFile, message); 22 | jQuery('.koalaui-loading,.koalaui-overlay').remove(); 23 | window.alert(message); 24 | }, false); 25 | 26 | //share main context 27 | global.mainWindow = nw.Window.get(); 28 | global.jQuery = jQuery; 29 | 30 | global.getFileManager = function () { 31 | return FileManager; 32 | }; 33 | global.debug = function (messge) { 34 | console.log(messge); 35 | }; 36 | 37 | //cache current active project 38 | global.activeProject = ''; 39 | 40 | //distinguish between different platforms 41 | $('body').addClass(process.platform); 42 | 43 | global.newMenu = function() { 44 | return new nw.Menu(); 45 | }; 46 | 47 | // render pages && application initialization 48 | require('./scripts/patch.js'); 49 | require('./scripts/renderpage.js'); 50 | require('./scripts/compilersManager.js'); 51 | require('./scripts/initialization.js'); -------------------------------------------------------------------------------- /src/app/settings/koala-config-of-less.json: -------------------------------------------------------------------------------- 1 | // Less project settings, you can edit it and set custom settings. 2 | { 3 | // The mappings of source directory and output directory 4 | "mappings": [ 5 | // { 6 | // "src": "path/to/source", 7 | // "dest": "path/to/output" 8 | // } 9 | ], 10 | 11 | // Add the ignore rules that Koala will not search them. 12 | // e.g. ["*.json", "*.txt", "test", "path/libs"] 13 | "ignores": ["*.css"], 14 | 15 | // Compile options of LESS. 16 | "options": { 17 | 18 | // Output style. Can be normal (default), compress. 19 | "outputStyle": "normal", 20 | 21 | // Outputs filename and line numbers, which will output the debug info within comments. 22 | "lineComments": false, 23 | 24 | // Outputs filename and line numbers, which will output the information within a fake media query which is compatible with the SASS format. 25 | "debugInfo": false, 26 | 27 | "strictMath": false, 28 | 29 | "strictUnits": false, 30 | 31 | // Create sourcemap files next to the generated CSS files 32 | "sourceMap": false, 33 | 34 | // auto add vendor prefixes to rules 35 | "autoprefix": true, 36 | "autoprefixConfig" : "> 1%, last 2 versions, Firefox ESR, Opera 12.1" 37 | }, 38 | 39 | // Other compile options. 40 | // e.g, ["--strict-imports", ... ,"--rootpath=URL"]. 41 | // Run the command 'lessc -h' to see more options. 42 | "customOptions": [], 43 | 44 | // An array of filesystem paths or importers which should be searched for LESS templates imported with the @import directive. 45 | "includePaths": [] 46 | } -------------------------------------------------------------------------------- /src/app/scripts/fileTypesManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * compilers manager module 3 | */ 4 | 5 | 'use strict'; 6 | 7 | exports.fileTypes = {}; 8 | 9 | /** 10 | * Add File Type Object 11 | * @param {object} typeObj File Type Object 12 | */ 13 | exports.addFileType = function (typeObj) { 14 | for (var k in typeObj) { 15 | exports.fileTypes[k] = typeObj[k]; 16 | } 17 | } 18 | 19 | /** 20 | * Get File Types 21 | * @return {object} file types 22 | */ 23 | exports.getFileTypes = function () { 24 | return exports.fileTypes; 25 | } 26 | 27 | /** 28 | * Get File Types As A Array 29 | * @return {array} file types 30 | */ 31 | exports.getFileTypesAsArray = function () { 32 | var fileTypes = []; 33 | for (var k in exports.fileTypes) { 34 | fileTypes.push(exports.fileTypes[k]); 35 | } 36 | return fileTypes; 37 | } 38 | 39 | /** 40 | * Get File Type Object By File Extension 41 | * @param {string} ext file extension 42 | * @return {object} file type 43 | */ 44 | exports.getFileTypeByExt = function (ext) { 45 | return exports.fileTypes[ext]; 46 | } 47 | 48 | /** 49 | * Get Extensions 50 | * @return {array} extensions 51 | */ 52 | exports.getExtensions = function () { 53 | return Object.keys(exports.fileTypes); 54 | } 55 | 56 | /** 57 | * Get Extensions Of Category 58 | * @param {string} category category name 59 | * @return {array} extensions 60 | */ 61 | exports.getExtsByCategory = function (category) { 62 | var exts = []; 63 | 64 | for (var k in exports.fileTypes) { 65 | if (exports.fileTypes[k].category === category) { 66 | exts.push(k); 67 | } 68 | } 69 | 70 | return exts; 71 | } -------------------------------------------------------------------------------- /src/app/scripts/pages/log.js: -------------------------------------------------------------------------------- 1 | /** 2 | * compile log 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var path = require('path'), 8 | fs = require('fs'); 9 | 10 | //Add error event listener 11 | var errorLog = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'] + '/.koala/error.log'; 12 | window.addEventListener('error', function (err) { 13 | var message = '---error---\n' + err.filename + ':' + err.lineno + '\n' + err.message + '\n\n'; 14 | fs.appendFile(errorLog, message); 15 | alert(message); 16 | }, false); 17 | 18 | function renderPage () { 19 | //distinguish between different platforms 20 | $('body').addClass(process.platform); 21 | 22 | var items = []; 23 | global.errorLogCollection.forEach(function (item) { 24 | items.push(getItemHtml(item)); 25 | }); 26 | 27 | var html = ''; 28 | for (var i = items.length -1; i >= 0; i--) { 29 | html += items[i]; 30 | } 31 | 32 | $('#log ul').html(html); 33 | } 34 | 35 | var itemTmpl =$('#log_tmpl')[0].innerHTML; 36 | function getItemHtml(log) { 37 | var html = itemTmpl; 38 | for (var k in log) { 39 | html = html.replace('{'+ k +'}', log[k]); 40 | } 41 | return html; 42 | } 43 | 44 | renderPage(); 45 | 46 | //clear log 47 | $('#clear').click(function () { 48 | global.errorLogCollection = []; 49 | $('#log ul').html(''); 50 | }); 51 | 52 | //press esc to close 53 | $(document).keydown(function (e) { 54 | if (e.which === 27) { 55 | parent.hideFrame(); 56 | } 57 | }); 58 | $('#titlebar .close').click(function () { 59 | parent.hideFrame(); 60 | }); 61 | -------------------------------------------------------------------------------- /src/app/settings/koala-config-of-sass.json: -------------------------------------------------------------------------------- 1 | // Sass project settings, you can edit it and set custom settings. 2 | { 3 | // The mappings of source directory and output directory 4 | "mappings": [ 5 | // { 6 | // "src": "path/to/source", 7 | // "dest": "path/to/output" 8 | // } 9 | ], 10 | 11 | // Add the ignore rules that Koala will not search them. 12 | // e.g. ["*.json", "*.txt", "test", "path/libs"] 13 | "ignores": ["*.css"], 14 | 15 | // Compile options of Sass. 16 | "options": { 17 | 18 | // Output style. Can be nested (default), compact, compressed, or expanded. 19 | "outputStyle": "nested", 20 | 21 | // Emit comments in the generated CSS indicating the corresponding source line. 22 | "lineComments": false, 23 | 24 | // Emit extra information in the generated CSS that can be used by the FireSass Firebug plugin. 25 | "debugInfo": false, 26 | 27 | // Create sourcemap files next to the generated CSS files 28 | "sourceMap": false, 29 | 30 | // Use Unix-style newlines in written files. 31 | "unixNewlines": false, 32 | 33 | // auto add vendor prefixes to rules 34 | "autoprefix": false, 35 | "autoprefixConfig" : "> 1%, last 2 versions, Firefox ESR, Opera 12.1" 36 | }, 37 | 38 | // Other compile options, use the full name of options. 39 | // e.g, ["--scss", ... ,"--no-cache"]. 40 | // Run the command 'sass -h' to see more options. 41 | "customOptions": [], 42 | 43 | // An array of filesystem paths or importers which should be searched for Sass templates imported with the @import directive. 44 | "includePaths": [], 45 | 46 | // A array of ruby libraries, require them before running Sass. 47 | "requireLibs": [] 48 | } -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | ### 2013-10-25 2 | * [CSS and JS concat] When a file does not exist, it should prompt an error. 3 | 4 | ### 2013-07-22 5 | * bug: less project reload error (new option: strict_math, strict_units) 6 | 7 | ### 2013-07-05 8 | * fix bug: Can't get download link of ja_jp. 9 | 10 | ### 2013-06-24 11 | * Windows version run the source code directly. 12 | * Built-in ruby in windows version 13 | 14 | ### 2013-06-24 15 | * bug: Still compiling the source file when the imported file modify even if the source file is not exists. 16 | * Add "toggle auto compile" to context menu. 17 | * Watch imported sass files when the `_` is omittable. 18 | 19 | ### 2013-06-20 20 | * help documentation 21 | * compress & concat css/javascript. 22 | 23 | ### 2013-06-13 24 | * use system libs option of compass 25 | * coffee compile option lint change to literate 26 | * update less to vesion 1.4.0 27 | * update coffee-script to version 1.6.3 28 | * project settings. 29 | 30 | ### 2013-06-05 31 | * compass full supports 32 | * windows version auto upgrade 33 | * fix bug: some file filtration failure 34 | 35 | ### 2013-06-02 36 | * Minimize on startup 37 | * Press Esc to close the window 38 | * include_path supports 39 | 40 | ### 2013-05-23 41 | * Change the program to upgrade the logic, to distinguish between different versions of the, in different languages ​​jump to a different page. 42 | * Change the upgrade prompt link, jump directly to the official website. 43 | * Increase the refresh result tooltips. 44 | * Change output edit icon, refresh button and complie button style. 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/app/assets/less/log.less: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | @import "_util.less"; 3 | 4 | .hide {display: none} 5 | #titlebar { 6 | font-size: 14px; 7 | font-weight: bold; 8 | border-bottom: 1px solid #ccc; 9 | text-indent: 10px; 10 | 11 | .close{ 12 | font-weight: bold; 13 | text-indent: 12px; 14 | font-size: 16px; 15 | display: block; 16 | width: 35px; 17 | height: 35px; 18 | float: right; 19 | 20 | &:hover {color: #555} 21 | } 22 | } 23 | 24 | #titlebar, 25 | #footer { 26 | height: 35px; 27 | line-height: 35px; 28 | } 29 | #footer { 30 | position: fixed; 31 | bottom: 0; 32 | width: 100%; 33 | text-align: right; 34 | border-top: 1px solid #CCC; 35 | background-color: #FFF; 36 | 37 | button { 38 | float: right; 39 | margin-right: 10px; 40 | margin-top: 6px; 41 | } 42 | } 43 | 44 | #main {padding: 10px 5px 0 10px;} 45 | 46 | #log_tmpl { 47 | position: relative; 48 | 49 | li {display: none} 50 | } 51 | 52 | #log { 53 | height: 394px; 54 | width: 100%; 55 | overflow: auto; 56 | -webkit-user-select: initial; 57 | cursor: initial; 58 | 59 | ul {padding-right: 5px;} 60 | li { 61 | border-bottom: 1px dashed #CCC; 62 | padding-bottom: 10px; 63 | margin-bottom: 10px; 64 | } 65 | li:last-child { 66 | border-bottom: none; 67 | } 68 | 69 | h3 { 70 | position: relative; 71 | line-height: 25px; 72 | } 73 | .time { 74 | position: absolute; 75 | right: 0; 76 | top:0; 77 | } 78 | .file { 79 | display: block; 80 | width: ~"-webkit-calc(100% - 50px)"; 81 | overflow: hidden; 82 | white-space: nowrap; 83 | text-overflow:ellipsis; 84 | font-weight: bold; 85 | } 86 | pre { 87 | color: #D00; 88 | word-break: break-word; 89 | } 90 | } 91 | .win32 #log {height: 358px;} 92 | -------------------------------------------------------------------------------- /src/app/locales/ja_jp/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Drag and drop a folder to add project.": "Drag and drop a folder to add project.", 5 | 6 | // settings.html 7 | "Settings": "環境設定", 8 | 9 | "General": "一般", 10 | 11 | "About": "情報", 12 | 13 | "Language:": "言語:", 14 | 15 | "Minimize To Tray": "タスクトレイに最小化", 16 | 17 | "Minimize On Startup": "タスクトレイで起動する", 18 | 19 | "Filter:": "フィルター:", 20 | 21 | "Default Options:": "デフォルトオプション", 22 | 23 | "No options.": "オプションなし", 24 | 25 | "compass project configuration instructions" : "プロジェクト内のconfig.rbファイルを編集します。
      設定ファイルがない場合は、以下の手順で作成することができます:
      プロジェクトアイコンを右クリック --> プロジェクト設定 --> 設定ファイルを作成 --> for compass.
      config.rbファイルがプロジェクトのディレクトリにない場合は、プロジェクトのルートディレクトリに移動し、\"http_path\"属性を設定してください。", 26 | 27 | "Project Website:": "ウェブサイト:", 28 | 29 | "Bug Report:": "バグを報告:", 30 | 31 | "[@settings.html]Version:": "バージョン:", 32 | 33 | "Check Upgrade": "アップデートを確認", 34 | 35 | "Checking...": "確認しています...", 36 | 37 | "new version available": "新しいバージョン v があります,", 38 | 39 | "Download Now": "ダウンロード", 40 | 41 | "This is the lastest version.": "最新バージョンです。", 42 | 43 | "Thanks:": "謝辞:", 44 | 45 | "Translator:": "日本語化:", 46 | 47 | "Built-in package versions:": "インストールされているバージョン:", 48 | 49 | "Ok": "OK", 50 | 51 | "Cancel": "キャンセル", 52 | 53 | // notifier.html 54 | 55 | "Notification": "通知", 56 | 57 | "Error": "エラー", 58 | 59 | "Close": "閉じる", 60 | 61 | // log.html 62 | "Log": "ログ", 63 | 64 | "Error Log": "エラーログ", 65 | 66 | "Clear All": "ログを消去", 67 | 68 | // jadetmpl.html 69 | "auto compile": "自動コンパイル", 70 | 71 | "Output Style": "アウトプットスタイル:", 72 | 73 | "[@jadetmpl.html]options:": "オプション:", 74 | 75 | "[@jadetmpl.html]compile": "コンパイル" 76 | } -------------------------------------------------------------------------------- /src/app/views/template/main.html: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |

      Koala

      4 |

      a cool tool for web developers

      5 |
      6 | 10 |
      11 | 23 |
      24 |
      25 | 26 |

      {{Drag and drop a folder to add project.}}

      27 |
      28 | 32 |
      33 | 34 | 35 | 36 | 37 |
        38 |
        39 | 40 |
        41 |
        42 | 51 |
        52 |
        53 |
        54 |
        55 |
        56 | -------------------------------------------------------------------------------- /src/app/scripts/pages/main/windows.js: -------------------------------------------------------------------------------- 1 | /** 2 | * window management 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var path = require('path'), 8 | appPackage = require('../../appConfigManager.js').getAppPackage(), 9 | FileManager = global.getFileManager(), 10 | $ = global.jQuery, 11 | document = global.mainWindow.window.document; 12 | 13 | 14 | var showFrame = function (url) { 15 | $('#frame')[0].src = url; 16 | $('#frame').show(); 17 | $('.koalaui-overlay').show(); 18 | } 19 | 20 | //open settings window 21 | $(document).on('click', '#settings', function (e) { 22 | showFrame(path.relative(FileManager.appDataDir, path.join(FileManager.appViewsDir, 'release/settings.html'))); 23 | }); 24 | 25 | //open log window 26 | $(document).on('click', '#log', function () { 27 | showFrame(path.relative(FileManager.appDataDir, path.join(FileManager.appViewsDir, 'release/log.html'))); 28 | }); 29 | 30 | //open external link 31 | $(document).on('click', '.externalLink', function () { 32 | nw.Shell.openExternal($(this).attr('href')); 33 | return false; 34 | }); 35 | 36 | var hideFrame = global.mainWindow.window.hideFrame = function () { 37 | $('#frame').hide(); 38 | $('#frame')[0].src = "about:blank"; 39 | $('.koalaui-overlay').hide(); 40 | }; 41 | 42 | $(document).keydown(function (e) { 43 | // press esc to close frame 44 | if (e.which === 27) { 45 | hideFrame(); 46 | } 47 | 48 | // press F12 open devtools 49 | if (appPackage.window.debug && e.which === 123) { 50 | global.mainWindow.showDevTools(); 51 | } 52 | }); 53 | 54 | 55 | //window minimize & close 56 | if (process.platform === 'win32') { 57 | $(document).on('click', '#titlebar .minimize', function () { 58 | global.mainWindow.minimize(); 59 | }); 60 | $(document).on('click', '#titlebar .close', function () { 61 | global.mainWindow.close(); 62 | }); 63 | } -------------------------------------------------------------------------------- /src/app/locales/zh_tw/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | //folder context item 4 | "Open Folder": "開啟目錄", 5 | 6 | "Rename": "重新命名", 7 | 8 | "Reload": "重新整理", 9 | 10 | "Delete": "刪除", 11 | 12 | "Are sure delete this folder?": "你確定刪除此資料夾嗎?", 13 | 14 | "Project Settings": "專案設定", 15 | 16 | "New Settings": "新增設定", 17 | 18 | "Edit Settings": "編輯設定", 19 | 20 | "Default": "預設", 21 | 22 | "For LESS": "LESS項目", 23 | 24 | "For Sass": "Sass項目", 25 | 26 | "For Compass": "Compass項目", 27 | 28 | "For CoffeeScript": "CoffeeScript項目", 29 | 30 | //file context item 31 | "Open File": "開啟檔案", 32 | 33 | "Open Containing Folder": "開啟檔案所在資料夾", 34 | 35 | "Open Output Folder": "開啟輸出資料夾", 36 | 37 | "Set Output Path": "設定輸出路徑", 38 | 39 | "Compile": "執行編譯", 40 | 41 | "Batch Compile": "批次編譯", 42 | 43 | "Remove": "移除檔案", 44 | 45 | "Toggle Auto Compile": "切換至自動編譯", 46 | 47 | //tray context item 48 | "Open": "開啟", 49 | 50 | "Settings": "設定", 51 | 52 | "Exit": "退出", 53 | 54 | "compiling...": "編譯中...", 55 | 56 | "New Version Found": "發現新版本 v${1}, 你現在要下載嗎?", 57 | 58 | "Some Compile errors, please see the compile log": "一些文件編譯發生錯誤, 詳情請看錯誤日誌。
        ${1} 個成功, ${2} 個失敗。", 59 | 60 | "x new file": "新增 ${1} 個檔案", 61 | 62 | "Network requests failed, please try again": "網路連線失敗,請重試。", 63 | 64 | "koala-config.json not found, please create it first.": "找不到koala-config.json,請先建立檔案。", 65 | 66 | "Settings file was created in the project directory. Do you want to edit it now?": "已在專案資料夾下新增了${1}檔案。
        是否立即編輯設定?", 67 | 68 | "Settings file has already exists. Do you want to edit it?": "${1}檔案已存在,是否要編輯設定?", 69 | 70 | "Please select a folder.": "請選擇一個資料夾。", 71 | 72 | "This folder has been added, whether you want to add it as a new project?": "這個目錄已經在專案列表中,你是否想要把它加入為一個新的專案項目?", 73 | 74 | "Language pack is installed successfully.": "\"${1}\"語系檔安裝成功。", 75 | 76 | "language pack update notification": "您正在使用的語系檔有更新,點擊確定更新到最新版本。", 77 | 78 | "Downloading the new language pack...": "正在下載語系檔...", 79 | 80 | "Language pack auto download failed, try download it manually.": "語系檔下載失敗,請嘗試手動下載。" 81 | } 82 | -------------------------------------------------------------------------------- /src/app/scripts/Compiler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Compiler Class 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var util = require('./util.js'), 8 | storage = require('./storage.js'), 9 | configManager = require('./appConfigManager.js'), 10 | notifier = require('./notifier.js'), 11 | fileWatcher = require('./fileWatcher.js'), 12 | FileManager = require('./FileManager.js'); 13 | 14 | /** 15 | * Compile Class 16 | * @param {object} config compiler config 17 | */ 18 | function Compiler (config) { 19 | for (var k in config) { 20 | this[k] = config[k]; 21 | } 22 | } 23 | 24 | module.exports = Compiler; 25 | 26 | /** 27 | * Compile Method 28 | * @param {object} file file object 29 | * @param {Object} handlers compile event handlers 30 | */ 31 | Compiler.prototype.compile = function(file, handlers) { 32 | // this method will be overwritten 33 | }; 34 | 35 | /** 36 | * Get Global Settings Of Compile 37 | * @param {string} compileName compiler name 38 | * @return {object} settings 39 | */ 40 | Compiler.prototype.getGlobalSettings = function(compileName) { 41 | return util.clone(configManager.getGlobalSettingsOfCompiler(compileName || this.name)); 42 | }; 43 | 44 | /** 45 | * Get App Config 46 | * @return {object} app config 47 | */ 48 | Compiler.prototype.getAppConfig = function () { 49 | return util.clone(configManager.getAppConfig()); 50 | }; 51 | 52 | /** 53 | * Get Project Data By Project ID 54 | * @param {string} pid project id 55 | * @return {object} project data 56 | */ 57 | Compiler.prototype.getProjectById= function (pid) { 58 | return util.clone(storage.getProjects()[pid]); 59 | }; 60 | 61 | /** 62 | * throw error message 63 | * @param {string} message error message 64 | * @param {string} filePath file path 65 | */ 66 | Compiler.prototype.throwError = function(message, filePath) { 67 | notifier.throwError(message, filePath); 68 | }; 69 | 70 | /** 71 | * watch import files 72 | * @param {array} imports import array 73 | * @param {string} sourceFile sourcr file 74 | */ 75 | Compiler.prototype.watchImports = function (imports, sourceFile) { 76 | fileWatcher.addImports(imports, sourceFile); 77 | } -------------------------------------------------------------------------------- /src/app/locales/ja_jp/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | //folder context item 4 | "Open Folder": "フォルダを開く", 5 | 6 | "Rename": "リネーム", 7 | 8 | "Reload": "再読み込み", 9 | 10 | "Delete": "削除", 11 | 12 | "Are sure delete this folder?": "フォルダを削除しますか?", 13 | 14 | "Project Settings": "プロジェクト設定", 15 | 16 | "New Settings": "設定ファイルを作成", 17 | 18 | "Edit Settings": "設定ファイルを編集", 19 | 20 | //file context item 21 | "Open File": "ファイルを開く", 22 | 23 | "Open Containing Folder": "ファイルのフォルダを開く", 24 | 25 | "Open Output Folder": "アウトプットフォルダを開く", 26 | 27 | "Set Output Path": "アウトプットパス設定", 28 | 29 | "Compile": "書き出す", 30 | 31 | "Batch Compile": "Batch Compile", 32 | 33 | "Remove": "削除", 34 | 35 | "Toggle Auto Compile": "自動コンパイル", 36 | 37 | //tray context item 38 | "Open": "開く", 39 | 40 | "Settings": "設定", 41 | 42 | "Exit": "終了", 43 | 44 | // tips 45 | 46 | "compiling...": "コンパイル中...", 47 | 48 | "New Version Found": "新しいバージョン v${1} があります。今すぐダウンロードしますか?", 49 | 50 | "Some Compile errors, please see the compile log": "コンパイルエラーです。エラーログを確認してください。
        ${1} succeeded, ${2} failed.", 51 | 52 | "x new file": "${1} new file", 53 | 54 | "Network requests failed, please try again": "ネットワークに接続できませんでした。もう一度接続を確認ください。", 55 | 56 | "koala-config.json not found, please create it first.": "Koala-config.jsonが見つかりません。作成してください。", 57 | 58 | "Settings file was created in the project directory. Do you want to edit it now?": "${1}をプロジェクトフォルダに作成しました。
        今すぐ編集しますか?", 59 | 60 | "Settings file has already exists. Do you want to edit it?": "${1}がすでに存在します。こちらを編集しますか?", 61 | 62 | "Please select a folder.": "フォルダを選択してください。", 63 | 64 | "This folder has been added, whether you want to add it as a new project?": "このフォルダはすでに追加されています。新規プロジェクトとして追加しますか?", 65 | 66 | "Installing the language pack...": "言語パックをインストールしています...", 67 | 68 | "Install the language pack failed:": "言語パックのインストールが失敗しました", 69 | 70 | "Not found the package.json file.": "package.jsonが見つかりませんでした", 71 | 72 | "Language pack is not complete.": "言語パックが完全ではありません", 73 | 74 | "Package.json is not complete.": "package.jsonが完全ではありません", 75 | 76 | "Language pack is installed successfully.": "${1} 言語パックのインストールが完了しました" 77 | } -------------------------------------------------------------------------------- /src/app/locales/zh_cn/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | //folder context item 4 | "Open Folder": "打开目录", 5 | 6 | "Rename": "重命名", 7 | 8 | "Reload": "重新载入", 9 | 10 | "Delete": "删除", 11 | 12 | "Are sure delete this folder?": "确定要删除该目录吗?", 13 | 14 | "Project Settings": "项目配置", 15 | 16 | "New Settings": "新建配置", 17 | 18 | "Edit Settings": "编辑配置", 19 | 20 | "Default": "默认", 21 | 22 | "For LESS": "LESS项目", 23 | 24 | "For Sass": "Sass项目", 25 | 26 | "For Compass": "Compass项目", 27 | 28 | "For CoffeeScript": "CoffeeScript项目", 29 | 30 | //file context item 31 | "Open File": "打开文件", 32 | 33 | "Open Containing Folder": "打开文件目录", 34 | 35 | "Open Output Folder": "打开输出目录", 36 | 37 | "Set Output Path": "设置输出路径", 38 | 39 | "Compile": "执行编译", 40 | 41 | "Batch Compile": "批量编译", 42 | 43 | "Remove": "移除文件", 44 | 45 | "Toggle Auto Compile": "切换自动编译", 46 | 47 | //tray context item 48 | "Open": "打开", 49 | 50 | "Settings": "设置", 51 | 52 | "Exit": "退出", 53 | 54 | "compiling...": "编译中...", 55 | 56 | "New Version Found": "发现新版本 v${1}, 你想现在就去下载吗?", 57 | 58 | "Some Compile errors, please see the compile log": "一些文件编译出错, 详情请查看编译日志。
        ${1} 个成功, ${2} 个失败。", 59 | 60 | "x new file": "新增 ${1} 个文件", 61 | 62 | "Network requests failed, please try again": "网络请求失败,请重试。", 63 | 64 | "koala-config.json not found, please create it first.": "未找到koala-config.json,请先创建一个。", 65 | 66 | "Settings file was created in the project directory. Do you want to edit it now?": "已在项目目录下创建了${1}文件。
        是否立即编辑配置?", 67 | 68 | "Settings file has already exists. Do you want to edit it?": "${1}文件已存在,是否要编辑配置?", 69 | 70 | "Please select a folder.": "请选择一个目录。", 71 | 72 | "This folder has been added, whether you want to add it as a new project?": "这个目录已在项目列表中,你是否想要把它添加为一个新的项目?", 73 | 74 | "Language pack is installed successfully.": "\"${1}\"语言包安装成功。", 75 | 76 | "language pack update notification": "你正在使用的语言包有更新,点击确定更新到最新版本。", 77 | 78 | "Downloading the new language pack...": "正在下载语言包...", 79 | 80 | "Language pack auto download failed, try download it manually.": "语言包下载失败,尝试手动下载。", 81 | 82 | "Do you want to uninstall this extension?": "确定要卸载该扩展吗?", 83 | 84 | "compiled successfully.": "编译成功: ${1}." 85 | } -------------------------------------------------------------------------------- /src/app/assets/less/koalaui.less: -------------------------------------------------------------------------------- 1 | /** 2 | * koala ui components 3 | */ 4 | 5 | //alert 6 | .koalaui-alert { 7 | width: 300px; 8 | height: 150px; 9 | background-color: #CEDEE9; 10 | box-shadow: 0 0 5px #A7A7A7; 11 | position: absolute; 12 | top:50%; 13 | left: 50%; 14 | margin-top: -75px; 15 | margin-left: -150px; 16 | z-index: 11; 17 | 18 | .text { 19 | padding: 20px; 20 | } 21 | 22 | footer { 23 | text-align: center; 24 | position: absolute; 25 | bottom: 20px; 26 | width: 100%; 27 | 28 | button { 29 | width: 75px; 30 | } 31 | } 32 | } 33 | 34 | //loading 35 | .koalaui-loading { 36 | width: 50px; 37 | height: 50px; 38 | background-color: #cedee9; 39 | position: absolute; 40 | top:50%; 41 | left: 50%; 42 | margin-top: -24px; 43 | margin-left: -24px; 44 | z-index: 11; 45 | box-shadow: 0 0 5px #A7A7A7; 46 | padding: 10px; 47 | background-size: 50px; 48 | background-repeat: no-repeat; 49 | background-position: 10px; 50 | background-image: url(../img/loading.gif); 51 | opacity: 0.8; 52 | //-webkit-animation: loading 1.2s ease-out infinite; 53 | } 54 | 55 | //tooltip 56 | .koalaui-tooltip { 57 | max-width: 300px; 58 | padding: 10px 20px; 59 | font-size: 14px; 60 | position: absolute; 61 | top:50%; 62 | left: 50%; 63 | pointer-events: none; 64 | background-color: #F9E98E; 65 | color: #915629; 66 | box-shadow: 0 0 5px #A7A7A7; 67 | z-index: 11; 68 | 69 | &.success { 70 | background-color: rgba(163, 249, 142, 0.8); 71 | color: rgba(62, 145, 41, 0.8); 72 | } 73 | &.error { 74 | background-color: rgba(249, 142, 142, 0.8); 75 | color: rgba(145, 41, 41, 0.8); 76 | } 77 | 78 | &.bigfont {font-size: 22px;} 79 | } 80 | 81 | //confirm 82 | .koalaui-confirm { 83 | .koalaui-alert; 84 | 85 | .ok { 86 | margin-right: 20px !important; 87 | } 88 | } 89 | 90 | //overlay 91 | .koalaui-overlay { 92 | position: absolute; 93 | width: 100%; 94 | height: 100%; 95 | z-index: 10; 96 | background-color: rgba(255, 255, 255, 0.3); 97 | opacity: 0; 98 | } 99 | .win32 .koalaui-overlay{ 100 | top:40px; 101 | height: ~"-webkit-calc(100% - 40px)"; 102 | } 103 | 104 | // loading animate 105 | @-webkit-keyframes loading { 106 | 0% {-webkit-transform: rotate(0)} 107 | 100% {-webkit-transform: rotate(360deg)} 108 | } -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Koala", 3 | "main": "app/main.html", 4 | "description": "Koala is a developer tool for LESS, Sass and CoffeeScript compilation.", 5 | "version": "2.3.0", 6 | "keywords": [ 7 | "less", 8 | "sass", 9 | "coffeescript", 10 | "dust", 11 | "compiler" 12 | ], 13 | "homepage": "http://koala-app.com", 14 | "bugs": { 15 | "url": "https://github.com/oklai/koala/issues" 16 | }, 17 | "maintainers": { 18 | "name": "Ethan Lai", 19 | "email": "lain.z.q@gmail.com", 20 | "web": "http://oklai.name?from=koala", 21 | "project": "http://koala-app.com", 22 | "issues": "https://github.com/oklai/koala/issues", 23 | "docs": "https://github.com/oklai/koala/wiki", 24 | "faq": "https://github.com/oklai/koala/wiki/FAQ", 25 | "upgrade": "http://koala-app.com/upgrade/upgrade.json", 26 | "locales_repositories": "http://koala-app.com/upgrade/locales_repositories.json", 27 | "compilers_repositories": "http://koala-app.com/upgrade/compilers_repositories.json" 28 | }, 29 | "contributors": [ 30 | { 31 | "name": "Max Deng", 32 | "web": "http://weibo.com/cooldz" 33 | }, 34 | { 35 | "name": "Leott Liu", 36 | "web": "http://t.qq.com/se7en860313" 37 | }, 38 | { 39 | "name": "Ziad El Khoury Hanna", 40 | "web": "https://github.com/zaygraveyard" 41 | } 42 | ], 43 | "window": { 44 | "debug": false, 45 | "icon": "app/assets/img/koala.png", 46 | "icon-mac": "app/assets/img/koala.tiff", 47 | "toolbar": false, 48 | "width": 900, 49 | "height": 556, 50 | "resizable": true, 51 | "position": "center", 52 | "frame": true, 53 | "show": false 54 | }, 55 | "platformOverrides": { 56 | "win": { 57 | "window": { 58 | "frame": false 59 | } 60 | } 61 | }, 62 | "dependencies": { 63 | "adm-zip": "0.4.7", 64 | "autoprefixer": "^7.1.6", 65 | "clean-css": "^4.1.9", 66 | "coffee-script": "^1.12.7", 67 | "eventproxy": "0.2.5", 68 | "fs-extra": "0.6.1", 69 | "jade": "0.27.7", 70 | "less": "^1.7.5", 71 | "postcss": "^6.0.14", 72 | "uglify-es": "^3.1.9", 73 | "uglify-js": "^3.1.9" 74 | }, 75 | "licenses": [ 76 | { 77 | "type": "Apache 2.0", 78 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 79 | } 80 | ], 81 | "repository": { 82 | "type": "git", 83 | "url": "https://github.com/oklai/koala.git" 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/app/assets/css/log.css: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | /* line 5, _util.less */ 3 | .flexbox { 4 | display: -webkit-box; 5 | -webkit-box-orient: horizontal; 6 | } 7 | /* line 4, log.less */ 8 | .hide { 9 | display: none; 10 | } 11 | /* line 5, log.less */ 12 | #titlebar { 13 | font-size: 14px; 14 | font-weight: bold; 15 | border-bottom: 1px solid #ccc; 16 | text-indent: 10px; 17 | } 18 | /* line 11, log.less */ 19 | #titlebar .close { 20 | font-weight: bold; 21 | text-indent: 12px; 22 | font-size: 16px; 23 | display: block; 24 | width: 35px; 25 | height: 35px; 26 | float: right; 27 | } 28 | /* line 20, log.less */ 29 | #titlebar .close:hover { 30 | color: #555555; 31 | } 32 | /* line 24, log.less */ 33 | #titlebar, 34 | #footer { 35 | height: 35px; 36 | line-height: 35px; 37 | } 38 | /* line 29, log.less */ 39 | #footer { 40 | position: fixed; 41 | bottom: 0; 42 | width: 100%; 43 | text-align: right; 44 | border-top: 1px solid #CCC; 45 | background-color: #FFF; 46 | } 47 | /* line 37, log.less */ 48 | #footer button { 49 | float: right; 50 | margin-right: 10px; 51 | margin-top: 6px; 52 | } 53 | /* line 44, log.less */ 54 | #main { 55 | padding: 10px 5px 0 10px; 56 | } 57 | /* line 46, log.less */ 58 | #log_tmpl { 59 | position: relative; 60 | } 61 | /* line 49, log.less */ 62 | #log_tmpl li { 63 | display: none; 64 | } 65 | /* line 52, log.less */ 66 | #log { 67 | height: 394px; 68 | width: 100%; 69 | overflow: auto; 70 | -webkit-user-select: initial; 71 | cursor: initial; 72 | } 73 | /* line 59, log.less */ 74 | #log ul { 75 | padding-right: 5px; 76 | } 77 | /* line 60, log.less */ 78 | #log li { 79 | border-bottom: 1px dashed #CCC; 80 | padding-bottom: 10px; 81 | margin-bottom: 10px; 82 | } 83 | /* line 65, log.less */ 84 | #log li:last-child { 85 | border-bottom: none; 86 | } 87 | /* line 69, log.less */ 88 | #log h3 { 89 | position: relative; 90 | line-height: 25px; 91 | } 92 | /* line 73, log.less */ 93 | #log .time { 94 | position: absolute; 95 | right: 0; 96 | top: 0; 97 | } 98 | /* line 78, log.less */ 99 | #log .file { 100 | display: block; 101 | width: -webkit-calc(100% - 50px); 102 | overflow: hidden; 103 | white-space: nowrap; 104 | text-overflow: ellipsis; 105 | font-weight: bold; 106 | } 107 | /* line 86, log.less */ 108 | #log pre { 109 | color: #D00; 110 | word-break: break-word; 111 | } 112 | /* line 91, log.less */ 113 | .win32 #log { 114 | height: 358px; 115 | } 116 | -------------------------------------------------------------------------------- /src/app/assets/libs/jquery.koalaui.js: -------------------------------------------------------------------------------- 1 | /** 2 | * UI components of koala 3 | */ 4 | 5 | (function ($) { 6 | 7 | 'use strict'; 8 | 9 | var koalaui = {}; 10 | 11 | /** 12 | * alert 13 | * @param {String} text alert text 14 | */ 15 | koalaui.alert = function (text, callback) { 16 | var alertElm = $('
        '); 17 | 18 | alertElm.find('.text').html(text); 19 | alertElm.find('button').one('click', function () { 20 | if (callback) callback(); 21 | alertElm.hide().remove(); 22 | }); 23 | alertElm.appendTo('body'); 24 | }; 25 | 26 | /** 27 | * loading 28 | * @param {String} text 29 | * @return {Object} loading object 30 | */ 31 | koalaui.loading = function (text) { 32 | var loadingElm = $('
        '); 33 | 34 | function CreateLoading () { 35 | //loadingElm.find('.text').html(text); 36 | loadingElm.appendTo('body'); 37 | 38 | this.hide = function () { 39 | loadingElm.hide().remove(); 40 | }; 41 | 42 | return this; 43 | } 44 | 45 | return new CreateLoading(); 46 | }; 47 | 48 | /** 49 | * tooltip 50 | * @param {String} status result status (warn|success|error) 51 | * @param {String} text result message 52 | * @return {Object} tooltip object 53 | */ 54 | koalaui.tooltip = function (status, text) { 55 | var tooltip = $('
        '); 56 | 57 | if (!text) { 58 | tooltip.addClass('bigfont'); 59 | text = status; 60 | } 61 | 62 | tooltip.addClass(status.toLowerCase()).html(text); 63 | tooltip.appendTo('body'); 64 | tooltip.css({ 65 | "margin-top": -tooltip.innerHeight()/2, 66 | "margin-left": -tooltip.innerWidth()/2 67 | }); 68 | 69 | setTimeout(function () { 70 | tooltip.hide().remove(); 71 | }, 1000); 72 | }; 73 | 74 | koalaui.confirm = function (text, okCallback, cancelCallback) { 75 | var confirmElm = $('
        '); 76 | 77 | confirmElm.find('.text').html(text); 78 | confirmElm.appendTo('body'); 79 | 80 | //trigger callback 81 | confirmElm.find('.ok').one('click', function () { 82 | if (okCallback) okCallback(); 83 | 84 | }); 85 | confirmElm.find('.cancel').one('click', function () { 86 | if (cancelCallback) cancelCallback(); 87 | }); 88 | 89 | //remove 90 | confirmElm.find('.ok, .cancel').one('click', function () { 91 | confirmElm.hide().remove(); 92 | }); 93 | }; 94 | 95 | $.koalaui = koalaui; 96 | })(jQuery); -------------------------------------------------------------------------------- /src/app/scripts/storage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * data storage module 3 | */ 4 | 5 | 'use strict'; 6 | 7 | /* 8 | //prject item 9 | class projectItem 10 | String id 11 | Object project 12 | 13 | prject model 14 | class project{ 15 | String id 16 | String name 17 | String src 18 | Object files 19 | Object config 20 | } 21 | 22 | file item 23 | class files{ 24 | String id 25 | Object file 26 | } 27 | file model 28 | class file{ 29 | String id 30 | String pid 31 | String extension 32 | String type 33 | String name 34 | String src 35 | String output 36 | Boolean compile 37 | Array imports 38 | Object settings{ 39 | String outputStyle [nested] //outputstyle 40 | } 41 | } 42 | */ 43 | 44 | var fs = require('fs'), 45 | path = require('path'), 46 | util = require('./util'), 47 | FileManager = global.getFileManager(), 48 | projectsDb = {}; //projects datatable object 49 | 50 | /** 51 | * projectDb initializition 52 | */ 53 | function projectDbinitialize() { 54 | //To read data from the file 55 | if (!fs.existsSync(FileManager.projectsFile)) { 56 | fs.appendFile(FileManager.projectsFile, '{}'); 57 | } else { 58 | projectsDb = util.readJsonSync(FileManager.projectsFile) || {}; 59 | } 60 | } 61 | 62 | projectDbinitialize(); 63 | 64 | /** 65 | * get projects datatable 66 | * @return {Object} projects datatable 67 | */ 68 | exports.getProjects = function () { 69 | return projectsDb; 70 | }; 71 | 72 | //save projects to file 73 | exports.updateJsonDb = function () { 74 | fs.writeFileSync(FileManager.projectsFile, JSON.stringify(projectsDb, null, '\t')); 75 | }; 76 | 77 | /** 78 | * get import files record 79 | * @return {Obeject} importsCollection 80 | */ 81 | exports.getImportsDb = function () { 82 | //read data from file 83 | var data = {}; 84 | 85 | if (fs.existsSync(FileManager.importsFile)) { 86 | data = util.readJsonSync(FileManager.importsFile); 87 | } 88 | 89 | return data; 90 | }; 91 | 92 | /** 93 | * save import files record 94 | */ 95 | exports.saveImportsDb = function (json) { 96 | var fd = fs.openSync(FileManager.importsFile, 'w'); 97 | fs.writeSync(fd, json); 98 | fs.closeSync(fd); 99 | }; 100 | 101 | /** 102 | * get history data 103 | * @return {Object} 104 | */ 105 | exports.getHistoryDb = function () { 106 | return JSON.parse(global.localStorage.getItem('historyDb') || '{}'); 107 | }; 108 | 109 | /** 110 | * save history data 111 | * @param {String} json 112 | */ 113 | exports.saveHistoryDb = function (data) { 114 | global.localStorage.setItem('historyDb', JSON.stringify(data)); 115 | }; -------------------------------------------------------------------------------- /src/app/assets/less/notifier.less: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | @import "font-awesome.css"; 3 | @import "_util.less"; 4 | 5 | ::-webkit-scrollbar:hover { 6 | background: none; 7 | } 8 | ::-webkit-scrollbar-thumb, 9 | ::-webkit-scrollbar-thumb:hover { 10 | background-color: #EB6868; 11 | } 12 | 13 | html { 14 | overflow: hidden; 15 | } 16 | html.hidden { 17 | display: none; 18 | } 19 | 20 | #notifier{ 21 | position: absolute; 22 | width: 100%; 23 | height: 100%; 24 | overflow: hidden; 25 | box-shadow: 0 0 5px #000; 26 | background-color: #F98E8E; 27 | color: #912929; 28 | } 29 | 30 | h1 { 31 | height: 25px; 32 | line-height: 25px; 33 | padding:0 5px; 34 | position: relative; 35 | border-bottom: 1px solid rgba(145, 41, 41, 0.3); 36 | 37 | .dragbar { 38 | display: block; 39 | height: 100%; 40 | width: ~"-webkit-calc(100% - 50px)"; 41 | float: left; 42 | -webkit-app-region: drag; 43 | text-transform: capitalize; 44 | } 45 | } 46 | 47 | #msg_wrap { 48 | padding:5px 3px 5px 0; 49 | height: 100%; 50 | } 51 | #msg { 52 | height: ~"-webkit-calc(100% - 35px)"; 53 | overflow-x: hidden; 54 | overflow-y: auto; 55 | padding: 0 5px; 56 | word-wrap: break-word; 57 | color: inherit; 58 | -webkit-user-select: initial; 59 | cursor: initial; 60 | } 61 | 62 | #close { 63 | position: absolute; 64 | top: -3px; 65 | right: 0; 66 | display: block; 67 | width: 40px; 68 | height: 100%; 69 | overflow: hidden; 70 | text-indent: -999px; 71 | background: none; 72 | border: none; 73 | color: inherit; 74 | outline: none; 75 | 76 | &::after { 77 | content: "×"; 78 | font-size: 18px; 79 | display: block; 80 | width: 100%; 81 | height: 100%; 82 | position: absolute; 83 | top: 0; 84 | right: 4px; 85 | text-align: right; 86 | } 87 | } 88 | 89 | // for success notification 90 | .success { 91 | ::-webkit-scrollbar-thumb, 92 | ::-webkit-scrollbar-thumb:hover { 93 | background-color: #FFFFFF; 94 | } 95 | 96 | &#notifier { 97 | box-shadow: 0 0 5px #4cae4c; 98 | background-color: #5cb85c; 99 | color: #FFFFFF; 100 | } 101 | 102 | h1 { 103 | border-bottom-color: #4cae4c; 104 | } 105 | 106 | #msg { 107 | padding-left: 90px; 108 | padding-right: 30px; 109 | padding-top: 14px; 110 | height: auto; 111 | min-height: 60px; 112 | position: relative; 113 | } 114 | #msg:before { 115 | content: "\f00c"; 116 | font-family: FontAwesome; 117 | font-style: normal; 118 | font-weight: normal; 119 | line-height: 1; 120 | -webkit-font-smoothing: antialiased; 121 | 122 | position: absolute; 123 | left: 30px; 124 | top: 14px; 125 | font-size: 34px; 126 | } 127 | #msg h3{ 128 | line-height: 1px; 129 | font-size: 32px; 130 | } 131 | } -------------------------------------------------------------------------------- /src/app/templates/locales/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "", 5 | 6 | "Rename": "", 7 | 8 | "Reload": "", 9 | 10 | "Delete": "", 11 | 12 | "Are sure delete this folder?": "", 13 | 14 | "Project Settings": "", 15 | 16 | "New Settings": "", 17 | 18 | "Edit Settings": "", 19 | 20 | "Default": "", 21 | 22 | "For LESS": "", 23 | 24 | "For Sass": "", 25 | 26 | "For Compass": "", 27 | 28 | "For CoffeeScript": "", 29 | 30 | // file context item 31 | "Open File": "", 32 | 33 | "Open Containing Folder": "", 34 | 35 | "Open Output Folder": "", 36 | 37 | "Set Output Path": "", 38 | 39 | "Compile": "", 40 | 41 | "Batch Compile": "", 42 | 43 | "Remove": "", 44 | 45 | "Toggle Auto Compile": "", 46 | 47 | // tray context item 48 | "Open": "", 49 | 50 | "Settings": "", 51 | 52 | "Exit": "", 53 | 54 | // tips 55 | "compiling...": "", 56 | 57 | "New Version Found": "New version found v${1}, do you want to download it now?", 58 | 59 | "Some Compile errors, please see the compile log": "Some file compile errors, please see the compile log.
        ${1} succeeded, ${2} failed.", 60 | 61 | "x new file": "${1} new file", 62 | 63 | "Network requests failed, please try again": "", 64 | 65 | "koala-config.json not found, please create it first.": "", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} was created in the project directory.
        Do you want to edit it now?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} has already exists. Do you want to edit it?", 70 | 71 | "Please select a folder.": "", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "", 74 | 75 | "Installing the language pack...": "", 76 | 77 | "Install the language pack failed:": "", 78 | 79 | "Not found the package.json file.": "", 80 | 81 | "Language pack is not complete.": "", 82 | 83 | "Package.json is not complete.": "", 84 | 85 | "Language pack is installed successfully.": "${1} language pack is installed successfully.", 86 | 87 | "language pack update notification": "The language pack you are using has been updated, do you want to update it now?", 88 | 89 | "Downloading the new language pack...": "", 90 | 91 | "Language pack auto download failed, try download it manually.": "", 92 | 93 | "Installing the compiler...": "", 94 | 95 | "The compiler install failed:": "", 96 | 97 | "Package is not complete": "Package is not complete, these fields are missing: ${1}", 98 | 99 | "Compiler pack is installed successfully.": "\"${1}\" compiler is installed successfully.", 100 | 101 | "compiler pack update notification": "New version found of these compilers.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "" 104 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **The project has been stopped!!** 2 | 3 | The development method has changed a lot be from the project start time to now, and there are many better alternatives in the open source community. So I think the projet is outdated, and decided to stop maintenance. 4 | Sorry about for this. 5 | If someone is still willing to continue maintenance, welcome to create a new project, it will be the best way. 6 | 7 | ## Introduction 8 | 9 | [![Join the chat at https://gitter.im/oklai/koala](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/oklai/koala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 10 | 11 | [http://koala-app.com](http://koala-app.com) 12 | 13 | Koala is a GUI application for LESS, Sass and CoffeeScript compilation, to help web developers use these tools more efficiently for development. 14 | 15 | [项目中文主页](http://koala-app.com/index-zh.html) 16 | 17 | ## Downloads 18 | v2.1.0 release [Changelog](https://github.com/oklai/koala/blob/master/Changelog.md) 19 | 20 | [Download](http://koala-app.com) 21 | 22 | 23 | ## Features 24 | 25 | * **Multi-language Support:** support for LESS, Sass, Compass Framework, CoffeeScript and Dust. 26 | * **Real-time Compilation:** listens to files, compiles automatically when file changes occur. Everything runs in the background without the need for user input. 27 | * **Compile Options Support:** compilation options are avaliable per file. 28 | * **Compression:** automatic compression of code after compilation has completed. 29 | * **Error Notification:** if an error is encountered during compilation, Koala will display an error notification. 30 | * **Cross-platform:** Koala runs perfectly on Windows, Linux and Mac. 31 | 32 | ## Screenshots 33 | 34 | ![linux](http://oklai.github.com/koala/img/screenshots/linux.png) 35 | 36 | ## Documents 37 | 38 | `koala` is built with [node-webkit](https://github.com/rogerwang/node-webkit). node-webkit is an app runtime based on Chromium and node.js. You can write native apps in HTML and Javascript with node-webkit. 39 | 40 | ### How to run Koala source code? 41 | 1. Clone Koala to the local; 42 | 2. For windows, **I DON'T KNOW YET** 43 | For Mac OS X and Linux, run `./install.sh` 44 | 3. Download [node-webkit](https://github.com/rogerwang/node-webkit) prebuilt binaries for your system environment. 45 | 4. For windows, copy `nw.exe, nw.pak, icudt.dll` to `koala/src` directory, and install [Ruby](http://www.ruby-lang.org/) to `koala/src/ruby`; 46 | For Linux, copy `nw, nw.pak`, install Ruby: `sudo apt-get install ruby`; 47 | For Mac OS X, copy `node-webkit.app`, OS X already have Ruby installed. 48 | 5. Run the `nw` executable file. 49 | 50 | ## License 51 | 52 | `koala`'s code uses the Apache license, Version 2.0, see our `LICENSE` file. 53 | 54 | 55 | [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/oklai/koala/trend.png)](https://bitdeli.com/free "Bitdeli Badge") 56 | 57 | -------------------------------------------------------------------------------- /src/app/assets/less/settings.less: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | @import "_util.less"; 3 | 4 | body { 5 | overflow: hidden; 6 | padding: 0; 7 | line-height: 25px; 8 | } 9 | a {text-decoration: underline} 10 | .hide {display: none} 11 | 12 | #titlebar { 13 | font-size: 14px; 14 | font-weight: bold; 15 | border-bottom: 1px solid #ccc; 16 | text-indent: 10px; 17 | 18 | .close{ 19 | font-weight: bold; 20 | text-indent: 12px; 21 | font-size: 16px; 22 | display: block; 23 | width: 35px; 24 | height: 35px; 25 | float: right; 26 | 27 | &:hover {color: #555} 28 | } 29 | } 30 | 31 | #titlebar, 32 | #footer { 33 | height: 35px; 34 | line-height: 35px; 35 | } 36 | 37 | #footer { 38 | position: fixed; 39 | bottom: 0; 40 | width: 100%; 41 | text-align: right; 42 | border-top: 1px solid #CCC; 43 | background-color: #FFF; 44 | 45 | button { 46 | min-width: 60px; 47 | margin-right: 10px; 48 | } 49 | } 50 | 51 | #outer {padding:10px 5px 0 0;} 52 | #inner { 53 | padding:0 0 0 10px; 54 | height: 394px; 55 | overflow-y: auto; 56 | .flexbox; 57 | } 58 | .win32 #inner {height: 358px;} 59 | 60 | .starborder { 61 | content: ""; 62 | position: absolute; 63 | top: 6px; 64 | left: 0; 65 | height: 18px; 66 | width: 4px; 67 | background-color: #999 68 | } 69 | #nav { 70 | width: 140px; 71 | height: 100%; 72 | border-right: 1px solid #ccc; 73 | overflow-x: hidden; 74 | overflow-y: auto; 75 | 76 | li { 77 | padding-left: 15px; 78 | line-height: 30px; 79 | height: 30px; 80 | position: relative; 81 | color: #999; 82 | //cursor: pointer; 83 | 84 | &:hover { 85 | color: #555 86 | } 87 | } 88 | li.current {color: #555} 89 | li.current::after{ 90 | .starborder; 91 | background-color: #555; 92 | } 93 | } 94 | .win32 #nav {width: 130px;} 95 | 96 | #content { 97 | -webkit-box-flex: 1; 98 | padding-left: 20px; 99 | padding-right: 15px; 100 | height: 100%; 101 | overflow: auto; 102 | 103 | h2 { 104 | font-weight: bold; 105 | margin-bottom: 10px; 106 | } 107 | h3 { 108 | margin-bottom: 5px; 109 | border-bottom: 1px solid #CCC; 110 | font-weight: bold; 111 | } 112 | .optionbox {margin-bottom: 15px;} 113 | label > input[type=text] {margin-left: 5px;} 114 | label > input[type=checkbox] {margin-right: 5px;} 115 | input[type=text] {min-width: 200px;} 116 | } 117 | 118 | #filter { 119 | padding: 0 3px; 120 | width: 150px; 121 | margin-left: 5px; 122 | } 123 | 124 | #checkupgrade { 125 | margin-left: 20px; 126 | } 127 | 128 | #upgradeloading { 129 | margin-left: 10px; 130 | display: none 131 | } 132 | 133 | #upgradetips { 134 | a {color: red;} 135 | .update,.noupdate { 136 | display: none; 137 | padding: 0 10px; 138 | margin: 10px 0; 139 | } 140 | .update { 141 | background-color: #FDFD67; 142 | } 143 | .noupdate { 144 | background-color: #E0E0E0; 145 | } 146 | } 147 | 148 | #link_download { 149 | margin-right: 5px; 150 | } 151 | 152 | .contributors { 153 | a {margin-right: 5px;} 154 | } -------------------------------------------------------------------------------- /src/app/locales/ko_kr/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "폴더 열기", 5 | 6 | "Rename": "이름변경", 7 | 8 | "Reload": "새로고침", 9 | 10 | "Delete": "삭제", 11 | 12 | "Are sure delete this folder?": "정말로 폴더를 삭제하시겠습니까?", 13 | 14 | "Project Settings": "프로젝트 설정", 15 | 16 | "New Settings": "새로운 설정", 17 | 18 | "Edit Settings": "설정 변경", 19 | 20 | "Default": "기본", 21 | 22 | "For LESS": "LESS용", 23 | 24 | "For Sass": "Sass용", 25 | 26 | "For Compass": "Compass용", 27 | 28 | "For CoffeeScript": "CoffeeScript용", 29 | 30 | // file context item 31 | "Open File": "파일 열기", 32 | 33 | "Open Containing Folder": "폴더 열기", 34 | 35 | "Open Output Folder": "출력 폴더 열기", 36 | 37 | "Set Output Path": "출력 경로 설정", 38 | 39 | "Compile": "컴파일", 40 | 41 | "Batch Compile": "일괄 컴파일", 42 | 43 | "Remove": "제거", 44 | 45 | "Toggle Auto Compile": "자동 컴파일 켜기/끄기", 46 | 47 | // tray context item 48 | "Open": "열기", 49 | 50 | "Settings": "설정", 51 | 52 | "Exit": "나가기", 53 | 54 | // tips 55 | "compiling...": "컴파일중...", 56 | 57 | "New Version Found": "새로운 버젼(v${1})이 있습니다., 지금 다운로드 하시겠습니까?", 58 | 59 | "Some Compile errors, please see the compile log": "일부 파일을 컴파일 하는 도중 오류가 발생했습니다.
        ${1} 성공, ${2} 실패.", 60 | 61 | "x new file": "${1}개의 새로운 파일", 62 | 63 | "Network requests failed, please try again": "네트워크 요청에 실패했습니다. 다시 시도해주세요.", 64 | 65 | "koala-config.json not found, please create it first.": "koala-config.json를 찾을 수 없습니다. 먼저 해당 파일을 생성해 주세요.", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1}프로젝트 디렉토리에 설정 파일이 생성되었습니다. 지금 편집하시겠습니까?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "이미 ${1} 파일이 존재합니다. 편집하시겠습니까?", 70 | 71 | "Please select a folder.": "폴더를 선택해 주세요.", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "폴더가 추가되었습니다. 새 프로젝트에 추가하시겠습니까?", 74 | 75 | "Installing the language pack...": "언어 패키지 설치중...", 76 | 77 | "Install the language pack failed:": "언어 패키지 설치에 실패했습니디ㅏ.", 78 | 79 | "Not found the package.json file.": "package.json파일을 찾을 수 없습니다.", 80 | 81 | "Language pack is not complete.": "언어 패키지가 설치되지 않았습니다.", 82 | 83 | "Package.json is not complete.": "Package.json가 설치되지 않았습니다.", 84 | 85 | "Language pack is installed successfully.": "${1}언어 패키지를 설치했습니다.", 86 | 87 | "language pack update notification": "사용중인 언어 패키지가 업데이트 되었습니다, 지금 업데이트 하시겠습니까?", 88 | 89 | "Downloading the new language pack...": "새로운 언어패키지 다운로드 중...", 90 | 91 | "Language pack auto download failed, try download it manually.": "언어 패키지 다운로드에 실패했습니다. 수동으로 다운로드 해 보십시오.", 92 | 93 | "Installing the compiler...": "컴파일러 설치중...", 94 | 95 | "The compiler install failed:": "컴파일러 설치 실패:", 96 | 97 | "Package is not complete": "패키지 설치가 완료되지 않았습니다. 아래 필드가 누락되었습니다 : ${1}", 98 | 99 | "Compiler pack is installed successfully.": "\"${1}\"컴파일러 설치에 성공했습니다.", 100 | 101 | "compiler pack update notification": "새로운 컴파일러 버젼을 찾았습니다.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "이 확장프로그램을 제거하시겠습니까?" 104 | } -------------------------------------------------------------------------------- /src/app/scripts/patch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * upgrade patches 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var fs = require('fs-extra'), 8 | path = require('path'), 9 | FileManager = global.getFileManager(), 10 | util = require('./util.js'); 11 | 12 | var init = function () { 13 | if (!fs.existsSync(FileManager.settingsFile) || !fs.existsSync(FileManager.projectsFile)) return false; 14 | var appPackage = util.readJsonSync(FileManager.packageJSONFile), 15 | appConfig = util.readJsonSync(FileManager.settingsFile); 16 | 17 | var curVersion = util.parseVersion(appPackage.version.replace(/-.*/, '')), 18 | lastVersion = util.parseVersion((appConfig.appVersion || '0').replace(/-.*/, '')); 19 | 20 | if (curVersion === lastVersion) { 21 | return false; 22 | } 23 | 24 | // for merge global compiler settings 25 | appConfig.compilers = appConfig.compilers || {}; 26 | ['less', 'sass', 'coffeescript', 'compass'].forEach(function(item){ 27 | var _item = item; 28 | if (_item === 'coffeescript') _item = 'coffee'; 29 | appConfig.compilers[_item] = appConfig.compilers[_item] || {options: {}, advanced: {}}; 30 | 31 | for (var k in appConfig[item]) { 32 | appConfig.compilers[_item].options[k] = appConfig[item][k]; 33 | } 34 | 35 | delete appConfig[item]; 36 | }); 37 | 38 | // for merge using system command settings 39 | for (var cmdName in appConfig.useSystemCommand) { 40 | if (cmdName === 'less') { 41 | appConfig.compilers.less.advanced.useCommand = appConfig.useSystemCommand[cmdName] 42 | } 43 | if (cmdName === 'coffeescript') { 44 | appConfig.compilers.coffee.advanced.useCommand = appConfig.useSystemCommand[cmdName] 45 | } 46 | if (cmdName === 'sass') { 47 | appConfig.compilers.sass.advanced.useSassCommand = appConfig.useSystemCommand[cmdName] 48 | } 49 | if (cmdName === 'compass') { 50 | appConfig.compilers.compass.advanced.useCompassCommand = appConfig.useSystemCommand[cmdName] 51 | } 52 | } 53 | delete appConfig.useSystemCommand; 54 | 55 | fs.writeFileSync(FileManager.settingsFile, JSON.stringify(appConfig, null, '\t')); 56 | 57 | // for reset watch and compiler property 58 | var projectsDb = util.readJsonSync(FileManager.projectsFile) || {}; 59 | for (var k in projectsDb) { 60 | if (projectsDb[k].files) { 61 | for (var j in projectsDb[k].files) { 62 | var file = projectsDb[k].files[j]; 63 | file.watch = true; 64 | if (/sass|scss/.test(file.type)) { 65 | file.compiler = 'sass'; 66 | file.category = 'style'; 67 | } 68 | if (file.type === 'less') { 69 | file.compiler = 'less'; 70 | file.category = 'style'; 71 | } 72 | if (file.type === 'coffee') { 73 | file.compiler = 'coffee'; 74 | file.category = 'script'; 75 | } 76 | } 77 | } 78 | } 79 | 80 | fs.writeFileSync(FileManager.projectsFile, JSON.stringify(projectsDb, null, '\t')); 81 | 82 | // Migration UseData in Mac OSX 83 | if (process.platform === 'darwin' && FileManager.oldUserDataDir !== FileManager.userDataDir && fs.existsSync(FileManager.oldUserDataDir)) { 84 | fs.readdirSync(FileManager.oldUserDataDir).forEach(function (fileName) { 85 | fs.renameSync(path.join(FileManager.oldUserDataDir, fileName), path.join(FileManager.userDataDir, fileName)); 86 | }); 87 | fs.rmdirSync(FileManager.oldUserDataDir); 88 | } 89 | } 90 | 91 | // run 92 | init(); -------------------------------------------------------------------------------- /src/app/assets/css/notifier.css: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | @import "font-awesome.css"; 3 | /* line 5, _util.less */ 4 | .flexbox { 5 | display: -webkit-box; 6 | -webkit-box-orient: horizontal; 7 | } 8 | /* line 5, notifier.less */ 9 | ::-webkit-scrollbar:hover { 10 | background: none; 11 | } 12 | /* line 8, notifier.less */ 13 | ::-webkit-scrollbar-thumb, 14 | ::-webkit-scrollbar-thumb:hover { 15 | background-color: #EB6868; 16 | } 17 | /* line 13, notifier.less */ 18 | html { 19 | overflow: hidden; 20 | } 21 | /* line 17, notifier.less */ 22 | html.hidden { 23 | display: none; 24 | } 25 | #notifier { 26 | position: absolute; 27 | width: 100%; 28 | height: 100%; 29 | overflow: hidden; 30 | box-shadow: 0 0 5px #000; 31 | background-color: #F98E8E; 32 | color: #912929; 33 | } 34 | /* line 27, notifier.less */ 35 | h1 { 36 | height: 25px; 37 | line-height: 25px; 38 | padding: 0 5px; 39 | position: relative; 40 | border-bottom: 1px solid rgba(145, 41, 41, 0.3); 41 | } 42 | /* line 34, notifier.less */ 43 | h1 .dragbar { 44 | display: block; 45 | height: 100%; 46 | width: -webkit-calc(100% - 50px); 47 | float: left; 48 | -webkit-app-region: drag; 49 | text-transform: capitalize; 50 | } 51 | /* line 44, notifier.less */ 52 | #msg_wrap { 53 | padding: 5px 3px 5px 0; 54 | height: 100%; 55 | } 56 | /* line 48, notifier.less */ 57 | #msg { 58 | height: -webkit-calc(100% - 35px); 59 | overflow-x: hidden; 60 | overflow-y: auto; 61 | padding: 0 5px; 62 | word-wrap: break-word; 63 | color: inherit; 64 | -webkit-user-select: initial; 65 | cursor: initial; 66 | } 67 | /* line 59, notifier.less */ 68 | #close { 69 | position: absolute; 70 | top: -3px; 71 | right: 0; 72 | display: block; 73 | width: 40px; 74 | height: 100%; 75 | overflow: hidden; 76 | text-indent: -999px; 77 | background: none; 78 | border: none; 79 | color: inherit; 80 | outline: none; 81 | } 82 | /* line 73, notifier.less */ 83 | #close::after { 84 | content: "×"; 85 | font-size: 18px; 86 | display: block; 87 | width: 100%; 88 | height: 100%; 89 | position: absolute; 90 | top: 0; 91 | right: 4px; 92 | text-align: right; 93 | } 94 | /* line 88, notifier.less */ 95 | .success ::-webkit-scrollbar-thumb, 96 | .success ::-webkit-scrollbar-thumb:hover { 97 | background-color: #FFFFFF; 98 | } 99 | /* line 93, notifier.less */ 100 | .success#notifier { 101 | box-shadow: 0 0 5px #4cae4c; 102 | background-color: #5cb85c; 103 | color: #FFFFFF; 104 | } 105 | /* line 99, notifier.less */ 106 | .success h1 { 107 | border-bottom-color: #4cae4c; 108 | } 109 | /* line 103, notifier.less */ 110 | .success #msg { 111 | padding-left: 90px; 112 | padding-right: 30px; 113 | padding-top: 14px; 114 | height: auto; 115 | min-height: 60px; 116 | position: relative; 117 | } 118 | /* line 111, notifier.less */ 119 | .success #msg:before { 120 | content: "\f00c"; 121 | font-family: FontAwesome; 122 | font-style: normal; 123 | font-weight: normal; 124 | line-height: 1; 125 | -webkit-font-smoothing: antialiased; 126 | position: absolute; 127 | left: 30px; 128 | top: 14px; 129 | font-size: 34px; 130 | } 131 | /* line 124, notifier.less */ 132 | .success #msg h3 { 133 | line-height: 1px; 134 | font-size: 32px; 135 | } 136 | -------------------------------------------------------------------------------- /src/app/assets/css/koalaui.css: -------------------------------------------------------------------------------- 1 | /** 2 | * koala ui components 3 | */ 4 | /* line 6, koalaui.less */ 5 | .koalaui-alert { 6 | width: 300px; 7 | height: 150px; 8 | background-color: #CEDEE9; 9 | box-shadow: 0 0 5px #A7A7A7; 10 | position: absolute; 11 | top: 50%; 12 | left: 50%; 13 | margin-top: -75px; 14 | margin-left: -150px; 15 | z-index: 11; 16 | } 17 | /* line 18, koalaui.less */ 18 | .koalaui-alert .text { 19 | padding: 20px; 20 | } 21 | /* line 22, koalaui.less */ 22 | .koalaui-alert footer { 23 | text-align: center; 24 | position: absolute; 25 | bottom: 20px; 26 | width: 100%; 27 | } 28 | /* line 28, koalaui.less */ 29 | .koalaui-alert footer button { 30 | width: 75px; 31 | } 32 | /* line 35, koalaui.less */ 33 | .koalaui-loading { 34 | width: 50px; 35 | height: 50px; 36 | background-color: #cedee9; 37 | position: absolute; 38 | top: 50%; 39 | left: 50%; 40 | margin-top: -24px; 41 | margin-left: -24px; 42 | z-index: 11; 43 | box-shadow: 0 0 5px #A7A7A7; 44 | padding: 10px; 45 | background-size: 50px; 46 | background-repeat: no-repeat; 47 | background-position: 10px; 48 | background-image: url(../img/loading.gif); 49 | opacity: 0.8; 50 | } 51 | /* line 56, koalaui.less */ 52 | .koalaui-tooltip { 53 | max-width: 300px; 54 | padding: 10px 20px; 55 | font-size: 14px; 56 | position: absolute; 57 | top: 50%; 58 | left: 50%; 59 | pointer-events: none; 60 | background-color: #F9E98E; 61 | color: #915629; 62 | box-shadow: 0 0 5px #A7A7A7; 63 | z-index: 11; 64 | } 65 | /* line 69, koalaui.less */ 66 | .koalaui-tooltip.success { 67 | background-color: rgba(163, 249, 142, 0.8); 68 | color: rgba(62, 145, 41, 0.8); 69 | } 70 | /* line 73, koalaui.less */ 71 | .koalaui-tooltip.error { 72 | background-color: rgba(249, 142, 142, 0.8); 73 | color: rgba(145, 41, 41, 0.8); 74 | } 75 | /* line 78, koalaui.less */ 76 | .koalaui-tooltip.bigfont { 77 | font-size: 22px; 78 | } 79 | /* line 82, koalaui.less */ 80 | .koalaui-confirm { 81 | width: 300px; 82 | height: 150px; 83 | background-color: #CEDEE9; 84 | box-shadow: 0 0 5px #A7A7A7; 85 | position: absolute; 86 | top: 50%; 87 | left: 50%; 88 | margin-top: -75px; 89 | margin-left: -150px; 90 | z-index: 11; 91 | } 92 | /* line 18, koalaui.less */ 93 | .koalaui-confirm .text { 94 | padding: 20px; 95 | } 96 | /* line 22, koalaui.less */ 97 | .koalaui-confirm footer { 98 | text-align: center; 99 | position: absolute; 100 | bottom: 20px; 101 | width: 100%; 102 | } 103 | /* line 28, koalaui.less */ 104 | .koalaui-confirm footer button { 105 | width: 75px; 106 | } 107 | /* line 85, koalaui.less */ 108 | .koalaui-confirm .ok { 109 | margin-right: 20px !important; 110 | } 111 | /* line 91, koalaui.less */ 112 | .koalaui-overlay { 113 | position: absolute; 114 | width: 100%; 115 | height: 100%; 116 | z-index: 10; 117 | background-color: rgba(255, 255, 255, 0.3); 118 | opacity: 0; 119 | } 120 | /* line 99, koalaui.less */ 121 | .win32 .koalaui-overlay { 122 | top: 40px; 123 | height: -webkit-calc(100% - 40px); 124 | } 125 | @-webkit-keyframes loading { 126 | /* line 106, koalaui.less */ 127 | 0% { 128 | -webkit-transform: rotate(0); 129 | } 130 | /* line 107, koalaui.less */ 131 | 100% { 132 | -webkit-transform: rotate(360deg); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /src/app/locales/fa_IR/context.json: -------------------------------------------------------------------------------- 1 | { 2 | "Open Folder": "باز کردن پوشه", 3 | 4 | "Rename": "تغییر نام", 5 | 6 | "Reload": "تازه سازی", 7 | 8 | "Delete": "حذف", 9 | 10 | "Are sure delete this folder?": "آیا شما از حذف این پوشه اتمینان دارید؟", 11 | 12 | "Project Settings": "تنظیمات پروژه", 13 | 14 | "New Settings": "تنظیمات تازه", 15 | 16 | "Edit Settings": "ویرایش تنظیمات", 17 | 18 | "Default": "پیشفرض", 19 | 20 | "For LESS": "برای Less", 21 | 22 | "For Sass": "برای Sass", 23 | 24 | "For Compass": "برای فشرده سازی", 25 | 26 | "For CoffeeScript": "برای CoffeeScript", 27 | 28 | "Open File": "بازکردن فایل", 29 | 30 | "Open Containing Folder": "باز کردن پوشه حاوی", 31 | 32 | "Open Output Folder": "بازکردن پوشه خروجی", 33 | 34 | "Set Output Path": "انتخاب مسیر خروجی", 35 | 36 | "Compile": "پردازش", 37 | 38 | "Batch Compile": "دسته پردازش", 39 | 40 | "Remove": "حذف", 41 | 42 | "Toggle Auto Compile": "ضامن خودکار پردازش", 43 | 44 | "Open": "بازکردن", 45 | 46 | "Settings": "تنظیمات", 47 | 48 | "Exit": "خروج", 49 | 50 | "compiling...": "در حال پردازش...", 51 | 52 | "New Version Found": "نسخه جدید یافت شد v${1} آیا شما قصد بروز رسانی به نسخه جدید را دارید؟", 53 | 54 | "Some Compile errors, please see the compile log": "خطا در پردازش
        ${1} , ${2}", 55 | 56 | "x new file": "${1} فایل جدید", 57 | 58 | "Network requests failed, please try again": "درخواست شبکه شکست خورده, لطفا دوباره تلاش کنید", 59 | 60 | "koala-config.json not found, please create it first.": "koala-config.json پیدا نشد, لطفاابتدا آن را ایجاد کنید.", 61 | 62 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} تنظیمات فایل در دایرکتوری پروژه ایجاد شد.
        آیا می خواهید آن را ویرایش کنید؟", 63 | 64 | "Settings file has already exists. Do you want to edit it?": "${1} تنظیمات فایل در حال حاضر وجود دارد. آیا می خواهید آن را ویرایش کنید؟", 65 | 66 | "Please select a folder.": "لطفا یک پوشه را انتخاب کنید.", 67 | 68 | "This folder has been added, whether you want to add it as a new project?": "یک پوشه اضافه شده است, آیا شما می خواهید آن را به عنوان یک پروژه جدید اضافه کنید؟", 69 | 70 | "Installing the language pack...": "در حال نصب بسته زبان ...", 71 | 72 | "Install the language pack failed:": "نصب بسته زبان شکست خورده:", 73 | 74 | "Not found the package.json file.": "در بسته فایل package.json یافت نشد.", 75 | 76 | "Language pack is not complete.": "بسته زبان کامل نیست.", 77 | 78 | "Package.json is not complete.": "Package.json کامل نیست.", 79 | 80 | "Language pack is installed successfully.": "${1} بسته زبان با موفقیت نصب شده است.", 81 | 82 | "language pack update notification": "بسته زبان روز شده است, آیا شما قصد بروزرسانی آن را دارید؟", 83 | 84 | "Downloading the new language pack...": "دانلود بسته زبان جدید ...", 85 | 86 | "Language pack auto download failed, try download it manually.": "دانلود خودکار بسته زبان شکست خورده. سعی کنید به صورت دستی آن را دانلود کنید.", 87 | 88 | "Installing the compiler...": "در حال نصب پردازشگر...", 89 | 90 | "The compiler install failed:": "نصب پردازشگر انجام نشد:", 91 | 92 | "Package is not complete": "بسته بندی کامل نیست ${1}", 93 | 94 | "Compiler pack is installed successfully.": "\"${1}\" بسته پردازشگر با موفقیت نصب شده است.", 95 | 96 | "compiler pack update notification": "نسخه جدید از این پردازشگر یافت شده است:
        ${1}", 97 | 98 | "Do you want to uninstall this extension?": "آیا می خواهید این برنامه افزودنی را حذف کنید؟" 99 | } -------------------------------------------------------------------------------- /src/app/templates/locales/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Minimize": "", 5 | 6 | "Close": "", 7 | 8 | "Add Folder": "", 9 | 10 | "Log": "", 11 | 12 | "Settings": "", 13 | 14 | "Drag and drop a folder to add project.": "", 15 | 16 | "Refresh": "", 17 | 18 | // settings.html 19 | "Settings": "", 20 | 21 | "General": "", 22 | 23 | "About": "", 24 | 25 | "Language:": "", 26 | 27 | "Minimize To Tray": "", 28 | 29 | "Minimize On Startup": "", 30 | 31 | "Notification when compile is completed": "", 32 | 33 | "Automatically compile files when project is added or reloaded": "", 34 | 35 | "Filter:": "", 36 | 37 | "e.g": "", 38 | 39 | "Default Options:": "", 40 | 41 | "No options.": "", 42 | 43 | "compass project configuration instructions" : "Just edit the config.rb file under the project directory.
        If the directory don't have this file, you can create one according to the following:
        right-click project item --> project settings --> new settings --> for compass.
        If the config.rb file in another directory, move to the root directory of the project and modify the \"http_path\" attributes.", 44 | 45 | "Project Website:": "", 46 | 47 | "Bug Report:": "", 48 | 49 | "[@settings.html]Version:": "", 50 | 51 | "Check Upgrade": "", 52 | 53 | "Checking...": "", 54 | 55 | "new version available": "Koala v now available,", 56 | 57 | "Download Now": "", 58 | 59 | "This is the lastest version.": "", 60 | 61 | "Thanks:": "", 62 | 63 | "Translator:": "", 64 | 65 | "Built-in package versions:": "", 66 | 67 | "Ok": "", 68 | 69 | "Cancel": "", 70 | 71 | "Default Options": "", 72 | 73 | "Advanced": "", 74 | 75 | "Advanced Settings": "", 76 | 77 | "Using System Commands:": "", 78 | 79 | "Libraries Version": "", 80 | 81 | "Maintainers": "", 82 | 83 | "Uninstall This Extension": "", 84 | 85 | "Contributors:": "", 86 | 87 | "Docs:": "", 88 | 89 | "Help": "", 90 | 91 | "Use Custom Ruby": "", 92 | 93 | "Use the Ruby executable at this path": "", 94 | 95 | "Browse Extensions": "", 96 | 97 | "Ignores": "", 98 | 99 | "Include Paths": "", 100 | 101 | "Default": "", 102 | 103 | // notifier.html 104 | "Notification": "", 105 | 106 | "Error": "", 107 | 108 | "Close": "", 109 | 110 | // log.html 111 | "Log": "", 112 | 113 | "Error Log": "", 114 | 115 | "Clear All": "", 116 | 117 | // main/settings.jade 118 | "auto compile": "", 119 | 120 | "output style:": "", 121 | 122 | "[@jadetmpl.html]options:": "", 123 | 124 | "[@jadetmpl.html]compile": "", 125 | 126 | // compilers package.json 127 | "Use the System LESS compiler": "", 128 | 129 | "Use the LESS executable at this path": "", 130 | 131 | "Default: lessc": "", 132 | 133 | "Use the System Sass compiler": "", 134 | 135 | "Use the Sass executable at this path": "", 136 | 137 | "Default: sass": "", 138 | 139 | "Use the System Compass compiler": "", 140 | 141 | "Use the Compass executable at this path": "", 142 | 143 | "Default: compass": "", 144 | 145 | "Use the System CoffeeScript compiler": "", 146 | 147 | "Use the CoffeeScript executable at this path": "", 148 | 149 | "Default: coffee": "", 150 | 151 | "Use the System Dust compiler": "", 152 | 153 | "Use the Dust executable at this path": "", 154 | 155 | "Default: dustc": "", 156 | 157 | "Output Style": "" 158 | } -------------------------------------------------------------------------------- /src/app/scripts/notifier.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notifier 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var path = require('path'), 8 | util = require('./util.js'), 9 | FileManager = global.getFileManager(), 10 | $ = global.jQuery, 11 | mainWindow = global.mainWindow; 12 | 13 | /** 14 | * throw error 15 | * @param {String} message error message 16 | * @param {String} filePath file path 17 | */ 18 | exports.throwError = function (message, filePath) { 19 | var fullMessage = message; 20 | if (filePath) { 21 | fullMessage = filePath + '\n' +message; 22 | } 23 | 24 | showNotification(fullMessage, 'error'); 25 | 26 | //add log 27 | addErrorLog({ 28 | file: filePath || "Error", 29 | message: message 30 | }); 31 | }; 32 | 33 | /** 34 | * throw completed 35 | * @param {String} message completed message 36 | * @param {String} filePath file path 37 | */ 38 | exports.throwCompleted = function (message, filePath) { 39 | if (filePath) { 40 | message = filePath; 41 | } 42 | 43 | showNotification(message, 'success'); 44 | }; 45 | 46 | /** 47 | * compile log 48 | * @type {Array} log 49 | */ 50 | global.errorLogCollection = []; 51 | function addErrorLog (log) { 52 | log.date = util.dateFormat(new Date(), "hh:mm:ss"); 53 | global.errorLogCollection.push(log); 54 | } 55 | 56 | //create a notifier window to show message 57 | exports.showNotification = showNotification; 58 | 59 | 60 | var notificationWindow; 61 | function showNotification(message, type) { 62 | //close opend notifier window 63 | if (notificationWindow) { 64 | try { 65 | notificationWindow.close(); 66 | } catch (e) {} 67 | } 68 | 69 | var options = {}; 70 | 71 | if (type === 'success') { 72 | options.height = 108; 73 | } 74 | 75 | createNotifierWindow(options, type, function(popWin) { 76 | popWin.on('loaded', function () { 77 | popWin.window.document.body.innerHTML = localStorage.getItem('views-notifier'); 78 | popWin.window.init(type, message); 79 | }); 80 | 81 | notificationWindow = popWin; 82 | }); 83 | } 84 | 85 | /** 86 | * create notifier window 87 | * @param {Object} options window options 88 | * @param {string} status type 89 | * @return {Object} new window 90 | */ 91 | function createNotifierWindow(options, type, callback) { 92 | var defaultOption = { 93 | width: 400, 94 | height: 150, 95 | frame: false, 96 | resizable: false, 97 | icon: 'file://' + path.join(FileManager.appAssetsDir, 'img', 'koala.png'), 98 | show: true, 99 | focus: false, 100 | transparent: true, 101 | show_in_taskbar: process.platform === 'darwin', 102 | always_on_top: true, 103 | }; 104 | 105 | options = $.extend(defaultOption, options); 106 | options.x = mainWindow.window.screen.width - options.width - 10, 107 | options.y = 10; 108 | 109 | //show in the lower right corner on windows system 110 | if (process.platform === 'win32') { 111 | options.y = mainWindow.window.screen.availHeight - options.height - 10; 112 | } 113 | else if (process.platform === 'darwin') { 114 | options.y = 25; 115 | } 116 | 117 | var url = 'file://' + path.join(FileManager.appViewsDir, 'release/notifier.html'); 118 | 119 | nw.Window.open(url, options, callback); 120 | } -------------------------------------------------------------------------------- /src/app/locales/zh_tw/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Drag and drop a folder to add project.": "拖曳資料夾到此處即可新增專案", 5 | 6 | // settings.html 7 | "Settings": "設定", 8 | 9 | "General": "基本設定", 10 | 11 | "About": "關於", 12 | 13 | "Language:": "語系:", 14 | 15 | "Minimize To Tray": "最小化到工具列", 16 | 17 | "Minimize On Startup": "啟動時預設最小化", 18 | 19 | "Filter:": "排除檔案:", 20 | 21 | "e.g": "範例", 22 | 23 | "Use System Libs:": "使用自定義編譯器版本:", 24 | 25 | "use system libs description": "勾選後,Koala將使用你系統中的編譯器來取代Koala內建的編譯器。
        注意:這個功能需要你手動在系統中安裝好該編譯器。", 26 | 27 | "Default Options:": "預設選項:", 28 | 29 | "No options.": "無選項。", 30 | 31 | "compass project configuration instructions": "請直接編輯專案資料夾下的config.rb檔案。
        如果config.rb檔案不存在,你可以按照以下步驟新增一個:
        在「專案資料夾」上點選滑鼠右鍵,選擇【專案設定】 --> 【新增設定】 --> 【Compass項目】
        如果config.rb檔案不存在專案資料夾根目錄下,請切換到根目錄,並對應修改\"http_path\"屬性", 32 | 33 | "Project Website:": "專案網址:", 34 | 35 | "Bug Report:": "Bug回報:", 36 | 37 | "[@settings.html]Version:": "當前軟體版本:", 38 | 39 | "Check Upgrade": "檢查更新", 40 | 41 | "Checking...": "檢查中...", 42 | 43 | "new version available": "Koala v 版本已發佈,", 44 | 45 | "Download Now": "立即下載", 46 | 47 | "This is the lastest version.": "已是最新版本。", 48 | 49 | "Thanks:": "感謝:", 50 | 51 | "Translator:": "翻譯者:", 52 | 53 | "Built-in package versions:": "內置元件版本訊息:", 54 | 55 | "Ok": "確定", 56 | 57 | "Cancel": "取消", 58 | 59 | "Default Options": "預設選項", 60 | 61 | "Advanced": "進階設定", 62 | 63 | "Advanced Settings": "進階設定", 64 | 65 | "Using System Commands:": "使用系統命令:", 66 | 67 | "Libraries Version": "元件版本:", 68 | 69 | "Maintainers": "維護者:", 70 | 71 | "Uninstall This Extension": "移除此套件", 72 | 73 | "Contributors:": "貢獻者", 74 | 75 | "Docs:": "教學文件:", 76 | 77 | "Help": "幫助", 78 | 79 | "Browse Extensions": "查看擴充套件", 80 | 81 | "Ignores": "過濾規則:", 82 | 83 | "Include Paths": "全局import目錄", 84 | 85 | "Default": "預設", 86 | 87 | // notifier.html 88 | "Notification": "通知", 89 | 90 | "Error": "錯誤", 91 | 92 | "Close": "關閉", 93 | 94 | // log.html 95 | "Log": "日誌", 96 | 97 | "Error Log": "錯誤日誌", 98 | 99 | "Clear All": "清空日誌", 100 | 101 | // jadetmpl.html 102 | "auto compile": "自動編譯", 103 | 104 | "output style:": "輸出方式:", 105 | 106 | "[@jadetmpl.html]options:": "編譯選項:", 107 | 108 | "[@jadetmpl.html]compile": "執行編譯", 109 | 110 | // compilers package.json 111 | "Use the System LESS compiler": "使用系统中的LESS編譯器", 112 | 113 | "Use the LESS executable at this path": "使用指定的LESS編譯器", 114 | 115 | "Default: lessc": "預設直接使用\"lessc\"指令", 116 | 117 | "Use the System Sass compiler": "使用系统中的Sass編譯器", 118 | 119 | "Use the Sass executable at this path": "使用指定的Sass編譯器", 120 | 121 | "Default: sass": "預設直接使用\"sass\"指令", 122 | 123 | "Use the System Compass compiler": "使用系统中的Compass編譯器", 124 | 125 | "Use the Compass executable at this path": "使用指定的Compass編譯器", 126 | 127 | "Default: compass": "預設直接使用\"compass\"指令", 128 | 129 | "Use the System CoffeeScript compiler": "使用系统中的CoffeeScript編譯器", 130 | 131 | "Use the CoffeeScript executable at this path": "使用指定的CoffeeScript編譯器", 132 | 133 | "Default: coffee": "預設直接使用\"coffee\"指令", 134 | 135 | "Use the System Dust compiler": "使用系统中的Dust編譯器", 136 | 137 | "Use the Dust executable at this path": "使用指定的Dust編譯器", 138 | 139 | "Default: dustc": "預設直接使用\"dustc\"指令", 140 | 141 | "Use Custom Ruby": "使用自定義的Ruby程式", 142 | 143 | "Use the Ruby executable at this path": "指定Ruby程式路徑", 144 | 145 | "Output Style": "輸出方式" 146 | } 147 | -------------------------------------------------------------------------------- /src/app/locales/zh_cn/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Drag and drop a folder to add project.": "拖放目录到这里即可添加项目", 5 | 6 | // settings.html 7 | "Settings": "设置", 8 | 9 | "General": "基本设置", 10 | 11 | "About": "关于", 12 | 13 | "Language:": "语言:", 14 | 15 | "Minimize To Tray": "最小化至托盘", 16 | 17 | "Minimize On Startup": "启动时默认最小化", 18 | 19 | "Notification when compile is completed": "编译完成后进行通知", 20 | 21 | "Filter:": "过滤文件:", 22 | 23 | "e.g": "例如", 24 | 25 | "Use System Libs:": "使用自定义的编译器版本:", 26 | 27 | "use system libs description": "选中后Koala将使用你系统中的编译器来代替Koala内置的编译器。
        注意:这个功能需要你手动在系统中安装好该编译器。", 28 | 29 | "Default Options:": "默认选项:", 30 | 31 | "No options.": "无选项。", 32 | 33 | "compass project configuration instructions": "请直接编辑项目目录下的config.rb文件。
        如果config.rb文件不存在,你可以按以下操作创建一个:
        右键项目元素 --> 项目配置 --> 新建配置 --> for compass。
        如果config.rb文件不在项目根目录下面,请移动至根目录,并相应地修改\"http_path\"属性", 34 | 35 | "Project Website:": "项目地址:", 36 | 37 | "Bug Report:": "Bug反馈:", 38 | 39 | "[@settings.html]Version:": "当前程序版本:", 40 | 41 | "Check Upgrade": "检查更新", 42 | 43 | "Checking...": "检测中...", 44 | 45 | "new version available": "Koala v 版本已发布,", 46 | 47 | "Download Now": "立即下载", 48 | 49 | "This is the lastest version.": "已是最新版本。", 50 | 51 | "Thanks:": "感谢:", 52 | 53 | "Translator:": "翻译者:", 54 | 55 | "Built-in package versions:": "内置组件版本信息:", 56 | 57 | "Ok": "确定", 58 | 59 | "Cancel": "取消", 60 | 61 | "Default Options": "默认选项", 62 | 63 | "Advanced": "高级设置", 64 | 65 | "Advanced Settings": "高级设置", 66 | 67 | "Using System Commands:": "使用系统命令:", 68 | 69 | "Libraries Version": "组件版本:", 70 | 71 | "Maintainers": "维护者:", 72 | 73 | "Uninstall This Extension": "卸载此扩展", 74 | 75 | "Contributors:": "贡献者", 76 | 77 | "Docs:": "使用文档:", 78 | 79 | "Help": "帮助", 80 | 81 | "Browse Extensions": "查看扩展程序", 82 | 83 | "Ignores": "过滤规则:", 84 | 85 | "Include Paths": "全局import目录", 86 | 87 | "Default": "默认", 88 | 89 | // notifier.html 90 | "Notification": "通知", 91 | 92 | "Error": "错误", 93 | 94 | "Close": "关闭", 95 | 96 | // log.html 97 | "Log": "日志", 98 | 99 | "Error Log": "错误日志", 100 | 101 | "Clear All": "清空日志", 102 | 103 | // jadetmpl.html 104 | "auto compile": "自动编译", 105 | 106 | "output style:": "输出方式:", 107 | 108 | "[@jadetmpl.html]options:": "编译选项:", 109 | 110 | "[@jadetmpl.html]compile": "执行编译", 111 | 112 | // compilers package.json 113 | "Use the System LESS compiler": "使用系统中的LESS编译器", 114 | 115 | "Use the LESS executable at this path": "使用指定的LESS编译器", 116 | 117 | "Default: lessc": "默认直接调用\"lessc\"命令", 118 | 119 | "Use the System Sass compiler": "使用系统中的Sass编译器", 120 | 121 | "Use the Sass executable at this path": "使用指定的Sass编译器", 122 | 123 | "Default: sass": "默认直接调用\"sass\"命令", 124 | 125 | "Use the System Compass compiler": "使用系统中的Compass编译器", 126 | 127 | "Use the Compass executable at this path": "使用指定的Compass编译器", 128 | 129 | "Default: compass": "默认直接调用\"compass\"命令", 130 | 131 | "Use the System CoffeeScript compiler": "使用系统中的CoffeeScript编译器", 132 | 133 | "Use the CoffeeScript executable at this path": "使用指定的CoffeeScript编译器", 134 | 135 | "Default: coffee": "默认直接调用\"coffee\"命令", 136 | 137 | "Use the System Dust compiler": "使用系统中的Dust编译器", 138 | 139 | "Use the Dust executable at this path": "使用指定的Dust编译器", 140 | 141 | "Default: dustc": "默认直接调用\"dustc\"命令", 142 | 143 | "Use Custom Ruby": "使用自定义的Ruby程序", 144 | 145 | "Use the Ruby executable at this path": "指定Ruby程序路径", 146 | 147 | "Output Style": "输出方式" 148 | } -------------------------------------------------------------------------------- /src/app/locales/ru_ru/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "Открыть папку", 5 | 6 | "Rename": "Переименовать", 7 | 8 | "Reload": "Обновить", 9 | 10 | "Delete": "Удалить", 11 | 12 | "Are sure delete this folder?": "Вы точно хотите удалить эту папку?", 13 | 14 | "Project Settings": "Настройки проекта", 15 | 16 | "New Settings": "Новые настройки", 17 | 18 | "Edit Settings": "Редактировать настройки", 19 | 20 | "Default": "По умолчанию", 21 | 22 | "For LESS": "Для LESS", 23 | 24 | "For Sass": "Для SASS", 25 | 26 | "For Compass": "Для Compass", 27 | 28 | "For CoffeeScript": "Для CoffeScript", 29 | 30 | // file context item 31 | "Open File": "Открыть файл", 32 | 33 | "Open Containing Folder": "Открыть папку содержащую файл", 34 | 35 | "Open Output Folder": "Открыть папку вывода", 36 | 37 | "Set Output Path": "Настройка пути вывода", 38 | 39 | "Compile": "Компилировать", 40 | 41 | "Batch Compile": "Пакетная компиляция", 42 | 43 | "Remove": "Удалить", 44 | 45 | "Toggle Auto Compile": "Переключить автокомпиляцию", 46 | 47 | // tray context item 48 | "Open": "Открыть", 49 | 50 | "Settings": "Настройки", 51 | 52 | "Exit": "Выход", 53 | 54 | // tips 55 | "compiling...": "компиляция...", 56 | 57 | "New Version Found": "Обнаружена новая версия v${1}, загрузить сейчас?", 58 | 59 | "Some Compile errors, please see the compile log": "Обнаружены ошибки компиляции, просмотрите журнал ошибок.
        ${1} успешно, ${2} не удалось.", 60 | 61 | "x new file": "${1} новый файл", 62 | 63 | "Network requests failed, please try again": "Соединение не установлено, попробуйте снова", 64 | 65 | "koala-config.json not found, please create it first.": "koala-config.json не найден, пожалуйста создайте его", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} создан в папке проекта.
        Редактировать?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} существует. Редактировать?", 70 | 71 | "Please select a folder.": "Пожалуйста, выберете папку", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "Папка создана, хотите добавить её в новый проект?", 74 | 75 | "Installing the language pack...": "Установка языкового пакета...", 76 | 77 | "Install the language pack failed:": "Установка языкового пакета не удалась:", 78 | 79 | "Not found the package.json file.": "Не найден файл package.json.", 80 | 81 | "Language pack is not complete.": "Языковой пакет не полный", 82 | 83 | "Package.json is not complete.": "Package.json не полный", 84 | 85 | "Language pack is installed successfully.": "${1} языковой пакет установлен успешно.", 86 | 87 | "language pack update notification": "Языковой пакет который вы используете был обновлен, обновить его сейчас?", 88 | 89 | "Downloading the new language pack...": "Загрузка нового языкового пакета", 90 | 91 | "Language pack auto download failed, try download it manually.": "Автозагрузка языкового пакета не удалась, попробуйте загрузить его вручную.", 92 | 93 | "Installing the compiler...": "Установка компилятора...", 94 | 95 | "The compiler install failed:": "Установка компилятора не удалась:", 96 | 97 | "Package is not complete": "Пакет не полный, не хватает: ${1}", 98 | 99 | "Compiler pack is installed successfully.": "\"${1}\" компилятор установлен успешно.", 100 | 101 | "compiler pack update notification": "Обнаружена новая версия компилятора.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "Удалить это расширение?" 104 | } 105 | -------------------------------------------------------------------------------- /src/app/locales/fi_fi/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "Avaa kansio", 5 | 6 | "Rename": "Uudelleennimeä", 7 | 8 | "Reload": "Päivitä", 9 | 10 | "Delete": "Poista", 11 | 12 | "Are sure delete this folder?": "Oletko varma, että haluat poistaa tämän kansion?", 13 | 14 | "Project Settings": "Projektin asetukset", 15 | 16 | "New Settings": "Uudet asetukset", 17 | 18 | "Edit Settings": "Muokkaa asetuksia", 19 | 20 | "Default": "Oletus", 21 | 22 | "For LESS": "LESSiä varten", 23 | 24 | "For Sass": "SASSia varten", 25 | 26 | "For Compass": "Compassia varten", 27 | 28 | "For CoffeeScript": "CoffeeScriptiä varten", 29 | 30 | // file context item 31 | "Open File": "Avaa tiedosto", 32 | 33 | "Open Containing Folder": "Avaa tiedostoa sisältävä kansio", 34 | 35 | "Open Output Folder": "Avaa ulostulon kansio", 36 | 37 | "Set Output Path": "Ulostulokansion asetukset", 38 | 39 | "Compile": "Käännä", 40 | 41 | "Batch Compile": "Eräkäännös", 42 | 43 | "Remove": "Poista", 44 | 45 | "Toggle Auto Compile": "Automaattinen käännös", 46 | 47 | // tray context item 48 | "Open": "Avaa", 49 | 50 | "Settings": "Asetukset", 51 | 52 | "Exit": "Poistu", 53 | 54 | // tips 55 | "compiling...": "käännetään...", 56 | 57 | "New Version Found": "Uusi versio v${1} havaittu, lataa nyt?", 58 | 59 | "Some Compile errors, please see the compile log": "Käännösvirheitä havaittu, katso käännösloki.
        ${1} onnistunut, ${2} epäonnistunut.", 60 | 61 | "x new file": "${1} uusi tiedosto", 62 | 63 | "Network requests failed, please try again": "Verkkoyhteys epäonnistui, kokeile uudestaan.", 64 | 65 | "koala-config.json not found, please create it first.": "koala-config.json ei löytynyt, ole hyvä ja luo se", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} on luotu projektikansiossa.
        Muokkaa?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} on olemassa. Muokkaa?", 70 | 71 | "Please select a folder.": "Valitse kansio", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "Kansio luotu, haluatko lisätä sen uuteen projektiin?", 74 | 75 | "Installing the language pack...": "Asennetaan kielipakettia...", 76 | 77 | "Install the language pack failed:": "Kielipaketin asennus epäonnistui:", 78 | 79 | "Not found the package.json file.": "Tiedostoa package.json ei löytynyt.", 80 | 81 | "Language pack is not complete.": "Kielipaketti ei ole valmis", 82 | 83 | "Package.json is not complete.": "Package.json ei ole valmis", 84 | 85 | "Language pack is installed successfully.": "Kielipaketti ${1} asennettu onnistuneesti.", 86 | 87 | "language pack update notification": "Käyttämääsi kielipakettia oli päivitetty, päivitä se nyt?", 88 | 89 | "Downloading the new language pack...": "Uuden kielipaketin lataaminen", 90 | 91 | "Language pack auto download failed, try download it manually.": "Kielipaketin automaattinen lataaminen epäonnisuti, kokeile ladata se manuaalisesti.", 92 | 93 | "Installing the compiler...": "Asennetaan kääntäjää...", 94 | 95 | "The compiler install failed:": "Kääntäjän asentaminen epäonnistui:", 96 | 97 | "Package is not complete": "Paketti ei ole valmis, puuttuu: ${1}", 98 | 99 | "Compiler pack is installed successfully.": "\"${1}\" kääntäjä asennettu onnistuneesti.", 100 | 101 | "compiler pack update notification": "Havaittu kääntäjän uusi versio.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "Poista tämä lisäosa?" 104 | } 105 | -------------------------------------------------------------------------------- /src/app/scripts/windowEvents.js: -------------------------------------------------------------------------------- 1 | /** 2 | * window events 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var fs = require('fs'), 8 | storage = require('./storage.js'), 9 | fileWatcher = require('./fileWatcher.js'), 10 | appConfig = require('./appConfigManager.js').getAppConfig(), 11 | appPackage = require('./appConfigManager.js').getAppPackage(), 12 | il8n = require('./il8n.js'), 13 | mainWindow = global.mainWindow, 14 | $ = global.jQuery; 15 | 16 | /** 17 | * save current application status 18 | */ 19 | function saveCurrentAppstatus() { 20 | var historyDb = storage.getHistoryDb(); 21 | historyDb.activeProject = global.activeProject; 22 | historyDb.window = { 23 | x: mainWindow.x, 24 | y: mainWindow.y 25 | }; 26 | storage.saveHistoryDb(historyDb); 27 | } 28 | 29 | // minimizeToTray 30 | var trayMenu = new nw.Menu(), tray; 31 | 32 | // window minimize event 33 | function onMinimize () { 34 | // always keep tray 35 | if (process.platform === 'darwin' && tray) { 36 | return false; 37 | } 38 | 39 | var trayIcon = process.platform === 'darwin' ? appPackage.window['icon-mac'] : appPackage.window.icon; 40 | tray = new nw.Tray({icon: trayIcon}); 41 | tray.menu = trayMenu; 42 | tray.on('click', function () { 43 | mainWindow.show(); 44 | 45 | // always keep tray 46 | if (process.platform === 'darwin') return false; 47 | 48 | this.remove(); 49 | tray = null; 50 | }); 51 | } 52 | // window restore event 53 | function onRestore () { 54 | // always keep tray 55 | if (process.platform === 'darwin') return false; 56 | 57 | if (tray) { 58 | tray.remove(); 59 | tray = null; 60 | } 61 | } 62 | 63 | // quit app 64 | function quitApp () { 65 | mainWindow.close(); 66 | saveCurrentAppstatus(); 67 | nw.App.quit(); 68 | } 69 | 70 | // create menu 71 | trayMenu.append(new nw.MenuItem({ 72 | label: il8n.__('Open'), 73 | click: function () { 74 | mainWindow.show(); 75 | onRestore(); 76 | } 77 | })); 78 | trayMenu.append(new nw.MenuItem({ 79 | label: il8n.__('Settings'), 80 | click: function () { 81 | mainWindow.show(); 82 | onRestore(); 83 | $('#settings').trigger('click'); 84 | } 85 | })); 86 | trayMenu.append(new nw.MenuItem({type: 'separator'})); 87 | trayMenu.append(new nw.MenuItem({ 88 | label: il8n.__('Exit'), 89 | click: quitApp 90 | })); 91 | 92 | // bind event 93 | mainWindow.on('minimize', function () { 94 | // minimize to tray has bug on linux 95 | if (appConfig.minimizeToTray && process.platform !== 'linux') { 96 | mainWindow.hide(); 97 | onMinimize(); 98 | } 99 | }); 100 | mainWindow.on('restore', function () { 101 | if (appConfig.minimizeToTray && process.platform !== 'linux') { 102 | onRestore(); 103 | } 104 | }); 105 | 106 | //main window on close 107 | if (process.platform === 'darwin') { 108 | // for mac 109 | onMinimize(); 110 | mainWindow.on('close', function (event) { 111 | if (event === 'quit') { 112 | // menubar->Quit or cmd+Q or dock->Quit or cmd+tab->cmd+Q 113 | quitApp(); 114 | } else { 115 | // event is `undefined` 116 | // user click the close button on the window 117 | mainWindow.hide(); 118 | onMinimize(); 119 | } 120 | }); 121 | nw.App.on('reopen', function () { 122 | mainWindow.show(); 123 | onRestore(); 124 | }); 125 | } else { 126 | // for windows & linux 127 | mainWindow.on('close', function () { 128 | quitApp(); 129 | }); 130 | } -------------------------------------------------------------------------------- /src/app/locales/fa_IR/views.json: -------------------------------------------------------------------------------- 1 | { 2 | "Minimize": "به حداقل رساندن", 3 | 4 | "Close": "خروج", 5 | 6 | "Add Folder": "افزودن پوشه", 7 | 8 | "Log": "ورود", 9 | 10 | "Settings": "تنظیمات", 11 | 12 | "Drag and drop a folder to add project.": "کشیدن و رها کردن یک پوشه به معنای اضافه کردن پروژه می باشد.", 13 | 14 | "Refresh": "تازه سازی", 15 | 16 | "Settings": "تنظیمات", 17 | 18 | "General": "عمومی", 19 | 20 | "About": "درباره", 21 | 22 | "Language:": "زبان:", 23 | 24 | "Minimize To Tray": "حداقل رساندن به اعلانیه", 25 | 26 | "Minimize On Startup": "به حداقل رساندن در هنگام راه اندازی", 27 | 28 | "Filter:": "فیلتر:", 29 | 30 | "e.g": "برای مثال", 31 | 32 | "Default Options:": "تنظیمات پیش فرض:", 33 | 34 | "No options.": "هیچ گزینه.", 35 | 36 | "compass project configuration instructions" : "compass project configuration instructions", 37 | 38 | "Project Website:": "صفحه پروژه:", 39 | 40 | "Bug Report:": "گزارش اشکال:", 41 | 42 | "[@settings.html]Version:": "نسخه:", 43 | 44 | "Check Upgrade": "برسی نسخه جدید", 45 | 46 | "Checking...": "درحال برسی...", 47 | 48 | "new version available": "نسخه کولا در دسترس است,", 49 | 50 | "Download Now": "دریافت", 51 | 52 | "This is the lastest version.": "این آخرین نسخه است", 53 | 54 | "Thanks:": "تشکر ها:", 55 | 56 | "Translator:": "مترجم:", 57 | 58 | "Built-in package versions:": "ساخته شده در نسخه های بسته بندی:", 59 | 60 | "Ok": "ذخیره", 61 | 62 | "Cancel": "لغو", 63 | 64 | "Default Options": "تنظیمات پیش فرض", 65 | 66 | "Advanced": "پیشرفته", 67 | 68 | "Advanced Settings": "تنظیمات پیشرفته", 69 | 70 | "Using System Commands:": "دستورات سیستم با استفاده از:", 71 | 72 | "Libraries Version": "نسخه کتابخانه", 73 | 74 | "Maintainers": "نگهداری", 75 | 76 | "Uninstall This Extension": "حذف این فرمت", 77 | 78 | "Contributors:": "همکاران:", 79 | 80 | "Docs:": "مستندات:", 81 | 82 | "Help": "راهنما", 83 | 84 | "Use Custom Ruby": "استفاده ازروبی سفارشی", 85 | 86 | "Use the Ruby executable at this path": "استفاده از مسیر اختصاصی", 87 | 88 | "Browse Extensions": "مرور افزودنی ها", 89 | 90 | "Ignores": "نادیده می گیرد", 91 | 92 | "Include Paths": "شامل مسیرهای", 93 | 94 | "Default": "پیشفرض", 95 | 96 | "Notification": "علانیه", 97 | 98 | "Error": "خطا", 99 | 100 | "Close": "خزوج", 101 | 102 | "Log": "ورود", 103 | 104 | "Error Log": "خطا ورودی", 105 | 106 | "Clear All": "پاک کردن همه", 107 | 108 | "auto compile": "پردازشگر خوردکار", 109 | 110 | "output style:": "خروجی شیوه نامه:", 111 | 112 | "[@jadetmpl.html]options:": "گزینه:", 113 | 114 | "[@jadetmpl.html]compile": "پردازشگر", 115 | 116 | "Use the System LESS compiler": "استفاده از کرنل اختصاصی", 117 | 118 | "Use the LESS executable at this path": "استفاده از مسیر اختصاصی", 119 | 120 | "Default: lessc": "مسیر پیش فرض: Less", 121 | 122 | "Use the System Sass compiler": "استفاده از کرنل اختصاصی", 123 | 124 | "Use the Sass executable at this path": "استفاده از مسیر اختصاصی", 125 | 126 | "Default: sass": "مسیر پیش فرض: Sass", 127 | 128 | "Use the System Compass compiler": "استفاده از کرنل اختصاصی", 129 | 130 | "Use the Compass executable at this path": "استفاده از مسیر اختصاصی", 131 | 132 | "Default: compass": "مسیر پیش فرض: compass", 133 | 134 | "Use the System CoffeeScript compiler": "استفاده از کرنل اختصاصی", 135 | 136 | "Use the CoffeeScript executable at this path": "استفاده از مسیر اختصاصی", 137 | 138 | "Default: coffee": "مسیر پیش فرض: coffee", 139 | 140 | "Use the System Dust compiler": "استفاده از کرنل اختصاصی", 141 | 142 | "Use the Dust executable at this path": "استفاده از مسیر اختصاصی", 143 | 144 | "Default: dustc": "مسیر پیش فرض: dustc", 145 | 146 | "Output Style": "خروجی شیوه نامه" 147 | 148 | } -------------------------------------------------------------------------------- /src/app/scripts/pages/main/filelist.js: -------------------------------------------------------------------------------- 1 | /** 2 | * file list management 3 | */ 4 | 5 | 'use strict'; 6 | 7 | //require lib 8 | var path = require('path'), 9 | storage = require('../../storage.js'), 10 | jadeManager = require('../../jadeManager.js'), 11 | compilersManager = require('../../compilersManager.js'), 12 | fileTypesManager = require('../../fileTypesManager.js'), 13 | $ = global.jQuery, 14 | document = global.mainWindow.window.document; 15 | 16 | //browse project files 17 | $(document).on('click', '#folders li', function () { 18 | if ($(this).hasClass('active')) return false; 19 | 20 | var loading = $.koalaui.loading(); 21 | 22 | var self = $(this), 23 | id = self.data('id'); 24 | 25 | var projectsDb = storage.getProjects(), 26 | files = projectsDb[id].files, 27 | fileList = [], 28 | html = ''; 29 | 30 | for (var k in files) { 31 | fileList.push(files[k]) 32 | } 33 | 34 | if (fileList.length > 0) { 35 | html = jadeManager.renderFiles(fileList); 36 | } 37 | 38 | $('#files ul').html(html); 39 | $('#folders .active').removeClass('active'); 40 | 41 | $('#typeNav .current').removeClass('current'); 42 | $('#typeNav li:first').addClass('current'); 43 | 44 | self.addClass('active'); 45 | global.activeProject = id; 46 | 47 | loading.hide(); 48 | }); 49 | 50 | // reload project files 51 | $(document).on('reload', '#folders li', function () { 52 | $('#filelist').html(''); 53 | $(this).removeClass('active').trigger('click'); 54 | }); 55 | 56 | //file type navigation 57 | $('#typeNav li').click(function () { 58 | if ($(this).hasClass('current')) return false; 59 | 60 | var type = $(this).data('type'); 61 | 62 | if (type === 'all') { 63 | $('#filelist li').show(); 64 | } else { 65 | $('#filelist li').hide(); 66 | $('#filelist .type_' + type).show(); 67 | } 68 | 69 | $('#typeNav .current').removeClass('current'); 70 | $(this).addClass('current'); 71 | }); 72 | 73 | //create selector 74 | var selectItemPrev = -1; 75 | $('#filelist').selectable({ 76 | filter: 'li:visible', 77 | stop: function (event, ui) { 78 | var selectedItems = $('#filelist li.ui-selected') 79 | if (selectedItems.length === 1) { 80 | selectedItems.trigger('setCompileOptions'); 81 | } else { 82 | $('#extend').removeClass('show'); 83 | } 84 | }, 85 | selecting: function(e, ui) { // on select 86 | var curr = $(ui.selecting.tagName, e.target).index(ui.selecting); // get selecting item index 87 | if(e.shiftKey && selectItemPrev > -1) { // if shift key was pressed and there is previous - select them all 88 | $(ui.selecting.tagName, e.target).slice(Math.min(selectItemPrev, curr), 1 + Math.max(selectItemPrev, curr)).addClass('ui-selected'); 89 | selectItemPrev = -1; // and reset prev 90 | } else { 91 | selectItemPrev = curr; // othervise just save prev 92 | } 93 | } 94 | }); 95 | 96 | //ctrl+a || command+a to select all 97 | $(document).on(process.platform === 'darwin' ? 'keydown.meta_a' : 'keydown.ctrl_a', function () { 98 | $('#filelist li').addClass('ui-selected'); 99 | $('#extend').removeClass('show'); 100 | }); 101 | 102 | // backspace || del to remove files and folders 103 | $(document).on(process.platform === 'darwin' ? 'keydown.backspace' : 'keydown.del', function () { 104 | if ($('#filelist li.ui-selected').length > 0) { 105 | $('#filelist li.ui-selected').filter(':first').trigger('removeFileItem'); 106 | } else { 107 | $('#folders').trigger('deleteItem', [$('#folders li.active').data('id')]); 108 | } 109 | }); -------------------------------------------------------------------------------- /src/app/locales/pt_br/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "Abrir Pasta", 5 | 6 | "Rename": "Renomear", 7 | 8 | "Reload": "Recarregar", 9 | 10 | "Delete": "Apagar", 11 | 12 | "Are sure delete this folder?": "Tem certeza que deseja apagar essa pasta?", 13 | 14 | "Project Settings": "Configurações do Projeto", 15 | 16 | "New Settings": "Novas Configurações", 17 | 18 | "Edit Settings": "Editar Configurações", 19 | 20 | "Default": "Padrão", 21 | 22 | "For LESS": "Para LESS", 23 | 24 | "For Sass": "Para Sass", 25 | 26 | "For Compass": "Para Compass", 27 | 28 | "For CoffeeScript": "Para CoffeScript", 29 | 30 | // file context item 31 | "Open File": "Abrir Arquivo", 32 | 33 | "Open Containing Folder": "Abrir o Conteúdo da Pasta", 34 | 35 | "Open Output Folder": "Abrir Pasta de Saída", 36 | 37 | "Set Output Path": "Definir Caminho de Saída", 38 | 39 | "Compile": "Compilar", 40 | 41 | "Batch Compile": "Compilar Batch", 42 | 43 | "Remove": "Remover", 44 | 45 | "Toggle Auto Compile": "Alterar Compilação Automática", 46 | 47 | // tray context item 48 | "Open": "Abrir", 49 | 50 | "Settings": "Configurações", 51 | 52 | "Exit": "Sair", 53 | 54 | // tips 55 | "compiling...": "Compilando...", 56 | 57 | "New Version Found": "Nova versão encontrada v${1}, deseja baixar agora?", 58 | 59 | "Some Compile errors, please see the compile log": "Alguns erros de compilação, consulte o log de compilação.
        ${1} Sucesso, ${2} Falhou.", 60 | 61 | "x new file": "${1} novo arquivo", 62 | 63 | "Network requests failed, please try again": "Solicitações de rede falhou, por favor tente novamente", 64 | 65 | "koala-config.json not found, please create it first.": "koala-config.json não encontrado, por favor, crie-o primeiro", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} Arquivo de configuração foi criado no diretório do projeto. Você quer editá-lo agora?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} Arquivo de configurações já existe. Você quer editá-lo?", 70 | 71 | "Please select a folder.": "Por favor, selecione uma pasta", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "Esta pasta foi adicionado, se você deseja adicioná-lo como um novo projeto?", 74 | 75 | "Installing the language pack...": "Instalando o pacote de idioma...", 76 | 77 | "Install the language pack failed:": "Instalação do pacote de idiomas falhou", 78 | 79 | "Not found the package.json file.": "Não foi encontrado o arquivo package.json", 80 | 81 | "Language pack is not complete.": "Pacote de idioma não está completa", 82 | 83 | "Package.json is not complete.": "Package.json não está completa", 84 | 85 | "Language pack is installed successfully.": "${1} Pacote de idioma está instalado com êxito.", 86 | 87 | "language pack update notification": "O pacote de idioma que você está usando existe atualizações, quer atualizá-lo agora?", 88 | 89 | "Downloading the new language pack...": "Baixar o novo pacote de idioma...", 90 | 91 | "Language pack auto download failed, try download it manually.": "Download do pacote de idioma automático falhou, tente baixá-lo manualmente", 92 | 93 | "Installing the compiler...": "Instalando o compilador...", 94 | 95 | "The compiler install failed:": "A instalação do compilador falhou", 96 | 97 | "Package is not complete": "Pacote não é completa, estes campos estão em falta: ${1}", 98 | 99 | "Compiler pack is installed successfully.": "\"${1}\" compilador foi instalado com sucesso.", 100 | 101 | "compiler pack update notification": "Nova versão encontrada destes compiladores.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "Você quer desinstalar esta extensão?" 104 | } -------------------------------------------------------------------------------- /src/app/locales/de_de/context.json: -------------------------------------------------------------------------------- 1 | { 2 | "Open Folder": "Ordner öffnen", 3 | 4 | "Rename": "Umbenennen", 5 | 6 | "Reload": "Neu laden", 7 | 8 | "Delete": "Löschen", 9 | 10 | "Are sure delete this folder?": "Sind Sie sicher, dass Sie den Ordner löschen wollen?", 11 | 12 | "Project Settings": "Projekteinstellungen", 13 | 14 | "New Settings": "Neue Einstellungen", 15 | 16 | "Edit Settings": "Einstellungen bearbeiten", 17 | 18 | "Default": "Standard", 19 | 20 | "For LESS": "Für LESS", 21 | 22 | "For Sass": "Für Sass", 23 | 24 | "For Compass": "Für Compass", 25 | 26 | "For CoffeeScript": "Für CoffeeScript", 27 | 28 | "Open File": "Datei öffnen", 29 | 30 | "Open Containing Folder": "Übergeordneten Ordner öffnen", 31 | 32 | "Open Output Folder": "Ausgabeordner öffnen", 33 | 34 | "Set Output Path": "Ausgabepfad bestimmen", 35 | 36 | "Compile": "Kompilieren", 37 | 38 | "Batch Compile": "Stapelkompilieren", 39 | 40 | "Remove": "Entfernen", 41 | 42 | "Toggle Auto Compile": "Automatische Kompilierung ein-/ausschalten", 43 | 44 | "Open": "Öffnen", 45 | 46 | "Settings": "Einstellungen", 47 | 48 | "Exit": "Beenden", 49 | 50 | "compiling...": "kompiliere...", 51 | 52 | "New Version Found": "Neue Version v${1} gefunden, wollen Sie sie herunterladen?", 53 | 54 | "Some Compile errors, please see the compile log": "Es traten Fehler bei der Kompilierung von Dateien auf. Bitte sehen Sie sich das Kompilierungsprotokoll an.
        ${1} erfolgreich, ${2} fehlschlagen.", 55 | 56 | "x new file": "${1} neue Datei", 57 | 58 | "Network requests failed, please try again": "Netzwerkanfragen fehlgeschlagen, bitte versuchen Sie es erneut", 59 | 60 | "koala-config.json not found, please create it first.": "koala-config.json wurde nicht gefunden, bitte erstellen Sie es zuerst.", 61 | 62 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} wurde im Projektverzeichnis erstellt.
        Wollen Sie es jetzt bearbeiten?", 63 | 64 | "Settings file has already exists. Do you want to edit it?": "${1} exsistiert bereits. Wollen Sie es bearbeiten?", 65 | 66 | "Please select a folder.": "Bitte wählen Sie einen Ordner aus.", 67 | 68 | "This folder has been added, whether you want to add it as a new project?": "Dieser Ordner wurde hinzugefügt, wollen Sie diesen als neues Projekt hinzuzufügen?", 69 | 70 | "Installing the language pack...": "Sprachpaket wird installiert...", 71 | 72 | "Install the language pack failed:": "Die Installation des Sprachpakets ist fehlgeschlagen:", 73 | 74 | "Not found the package.json file.": "Die package.json Datei wurde nicht gefunden.", 75 | 76 | "Language pack is not complete.": "Das Sprachpaket ist nicht komplett.", 77 | 78 | "Package.json is not complete.": "Package.json ist nicht komplett.", 79 | 80 | "Language pack is installed successfully.": "${1} Sprachpaket wurde erfolgreich installiert.", 81 | 82 | "language pack update notification": "Das Sprachpaket, welches Sie benutzen wurde aktualisiert, wollen Sie die Änderungen jetzt übernehmen?", 83 | 84 | "Downloading the new language pack...": "Neues Sprachpaket wird heruntergeladen...", 85 | 86 | "Language pack auto download failed, try download it manually.": "Das automatische Herunterladen des Sprachpakets ist fehlgeschlagen. Versuchen Sie es manuell herunterzuladen.", 87 | 88 | "Installing the compiler...": "Kompilierer wird installiert...", 89 | 90 | "The compiler install failed:": "Die Kompilierer Installation ist fehlgeschlagen:", 91 | 92 | "Package is not complete": "Erweiterung ist nicht komplett. Diese Felder fehlen: ${1}", 93 | 94 | "Compiler pack is installed successfully.": "\"${1}\" Kompilierer wurde erfolgreich installiert.", 95 | 96 | "compiler pack update notification": "Eine neue Version für diese Kompilierer wurde gefunden:
        ${1}", 97 | 98 | "Do you want to uninstall this extension?": "Wollen Sie diese Erweiterung deinstallieren?" 99 | } -------------------------------------------------------------------------------- /src/app/scripts/compilers/common.js: -------------------------------------------------------------------------------- 1 | /* 2 | Compiler common function 3 | */ 4 | 5 | var fs = require('fs'), 6 | path = require('path'), 7 | projectSettings = require('../projectSettings.js'), 8 | fileWatcher = require('../fileWatcher.js'); 9 | 10 | /** 11 | * get LESS/Sass @import files 12 | * @param {String} lang 13 | * @param {String} srcFile 14 | * @return {Object} 15 | */ 16 | function getOrWatchStyleImports (lang, srcFile, deepWatch, deepLevel) { 17 | //match imports from code 18 | var result = [], 19 | code = fs.readFileSync(srcFile, 'utf8'); 20 | 21 | code = code.replace(/\/\/.+?[\r\t\n]/g, '').replace(/\/\*[\s\S]+?\*\//g, ''); 22 | 23 | var imports = code.match(/@import.+?[\"\'](.+?)[\"\']/g) || []; 24 | 25 | if (imports.length === 0) return []; 26 | 27 | var matchs; 28 | imports.forEach(function (item, index) { 29 | matchs = item.match(/.+?[\"\'](.+?)[\"\']/) || []; 30 | item = matchs[1]; 31 | 32 | if (!item) return false; 33 | 34 | if (/.less|.sass|.scss/.test(path.extname(item)) || path.extname(item) === '') { 35 | result.push(item); 36 | } 37 | }); 38 | 39 | //get fullpath of imports 40 | var dirname = path.dirname(srcFile), 41 | extname = path.extname(srcFile), 42 | fullPathImports = []; 43 | 44 | result.forEach(function (item) { 45 | if (path.extname(item) !== extname) { 46 | item += extname; 47 | } 48 | var file = path.resolve(dirname, item); 49 | 50 | // the '_' is omittable sass imported file 51 | if (lang === 'sass' && path.basename(item).indexOf('_') === -1) { 52 | var temPath = path.resolve(path.dirname(file), '_' + path.basename(item)); 53 | if (fs.existsSync(temPath)) { 54 | file = temPath; 55 | } 56 | } 57 | 58 | if (fs.existsSync(file)) fullPathImports.push(file); 59 | }); 60 | 61 | if (deepWatch && deepLevel <= 5) { 62 | 63 | fileWatcher.addImports(fullPathImports, srcFile); 64 | 65 | deepLevel ++; 66 | 67 | fullPathImports.forEach(function (item) { 68 | exports.getStyleImports(lang, item, deepWatch, deepLevel); 69 | }); 70 | return false; 71 | } 72 | 73 | return fullPathImports; 74 | } 75 | 76 | exports.getStyleImports = getOrWatchStyleImports; 77 | 78 | exports.watchImports = function (lang, srcFile) { 79 | getOrWatchStyleImports(lang, srcFile, true, 1); 80 | }; 81 | 82 | /** 83 | * auto add vendor prefixes 84 | * @param {object} file object 85 | */ 86 | exports.autoprefix = function (file, done) { 87 | var cssFile = file.output, 88 | css = fs.readFileSync(cssFile); 89 | 90 | exports.autoprefixCSS(file.settings, css, function(css) { 91 | if (file.settings.sourceMap) { 92 | css = css + '\n/*# sourceMappingURL=' + path.basename(cssFile) + '.map */'; 93 | } 94 | 95 | fs.writeFileSync(cssFile, css); 96 | 97 | done(); 98 | }); 99 | }; 100 | 101 | exports.autoprefixCSS = function (settings, css, done) { 102 | var autoprefixer = require('autoprefixer'), 103 | postcss = require('postcss'); 104 | 105 | var config = exports.getAutoprefixConfig(settings.autoprefixConfig); 106 | postcss([autoprefixer(config)]).process(css).then(function(result) { 107 | done(result.css); 108 | }); 109 | }; 110 | 111 | exports.getAutoprefixConfig = function (config) { 112 | var browsers = []; 113 | if (config && typeof(config) === 'string') { 114 | config = config.split(',').forEach(function (item) { 115 | item = item.trim(); 116 | if (item) { 117 | browsers.push(item); 118 | } 119 | }); 120 | } 121 | 122 | return browsers.length ? {browsers: browsers} : null; 123 | }; -------------------------------------------------------------------------------- /src/app/locales/it_it/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "Apri cartella", 5 | 6 | "Rename": "Rinomina", 7 | 8 | "Reload": "Ricarica", 9 | 10 | "Delete": "Elimina", 11 | 12 | "Are sure delete this folder?": "Sei sicuro di voler eliminare questa cartella?", 13 | 14 | "Project Settings": "Impostazioni del progetto", 15 | 16 | "New Settings": "Nuove impostazioni", 17 | 18 | "Edit Settings": "Modifica impostazioni", 19 | 20 | "Default": "Predefinito", 21 | 22 | "For LESS": "Per LESS", 23 | 24 | "For Sass": "Per Sass", 25 | 26 | "For Compass": "Per Compass", 27 | 28 | "For CoffeeScript": "Per CoffeeScript", 29 | 30 | // file context item 31 | "Open File": "Apri file", 32 | 33 | "Open Containing Folder": "Apri cartella corrispondente", 34 | 35 | "Open Output Folder": "Apri cartella di Output", 36 | 37 | "Set Output Path": "Imposta destinazione di Output", 38 | 39 | "Compile": "Compila", 40 | 41 | "Batch Compile": "Compilazione Batch", 42 | 43 | "Remove": "Rimuovi", 44 | 45 | "Toggle Auto Compile": "Attiva/Disattiva compilazione automatica", 46 | 47 | // tray context item 48 | "Open": "Apri", 49 | 50 | "Settings": "Impostazioni", 51 | 52 | "Exit": "Esci", 53 | 54 | // tips 55 | "compiling...": "compilazione in corso...", 56 | 57 | "New Version Found": "Nuova versione disponibile v${1}, vuoi scaricarla ora?", 58 | 59 | "Some Compile errors, please see the compile log": "Sono presenti alcuni errori di compilazione, prego controllare il log di compilazione.
        ${1} riusciti, ${2} falliti.", 60 | 61 | "x new file": "${1} nuovo file", 62 | 63 | "Network requests failed, please try again": "Connessione fallita, prego riprovare.", 64 | 65 | "koala-config.json not found, please create it first.": "koala-config.json non trovato, prego crearlo prima", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} è stato creato nella directory del progetto.
        Vuoi modificarlo ora?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} esiste già. Vuoi modificarlo?", 70 | 71 | "Please select a folder.": "Prego selezionare una cartella", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "Cartella aggiunta, vuoi aggiungerla come nuovo progetto?", 74 | 75 | "Installing the language pack...": "Installazione del language pack in corso", 76 | 77 | "Install the language pack failed:": "Installazione del language pack fallita.", 78 | 79 | "Not found the package.json file.": "Il file package.json non esiste", 80 | 81 | "Language pack is not complete.": "Il language pack non è completo", 82 | 83 | "Package.json is not complete.": "Il file package.json non è completo", 84 | 85 | "Language pack is installed successfully.": "${1} Language pack è stato installato con successo.", 86 | 87 | "language pack update notification": "Il language pack che stai usando è stato aggiornato, vuoi aggiornarlo ora?", 88 | 89 | "Downloading the new language pack...": "Scaricamento del nuovo language pack in corso...", 90 | 91 | "Language pack auto download failed, try download it manually.": "Lo scaricamento automatico del language pack è fallito, prego provare a scaricarlo manualmente.", 92 | 93 | "Installing the compiler...": "Installazione del compilatore in corso...", 94 | 95 | "The compiler install failed:": "Installazione del compilatore fallita.", 96 | 97 | "Package is not complete": "Il pacchetto non è completo, i seguenti campi risultano mancanti: ${1}", 98 | 99 | "Compiler pack is installed successfully.": "Compilatore \"${1}\" è stato installato con successo.", 100 | 101 | "compiler pack update notification": "Nuove versioni di questi compilatori disponibili.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "Vuoi disinstallare questa estensione?" 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/app/locales/ko_kr/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Minimize": "최소화", 5 | 6 | "Close": "닫기", 7 | 8 | "Add Folder": "폴더 추가", 9 | 10 | "Log": "로그", 11 | 12 | "Settings": "설정", 13 | 14 | "Drag and drop a folder to add project.": "폴더를 드래그 드랍하여 프로젝트 추가", 15 | 16 | "Refresh": "새로고침", 17 | 18 | // settings.html 19 | "Settings": "설정", 20 | 21 | "General": "일반", 22 | 23 | "About": "정보", 24 | 25 | "Language:": "언어", 26 | 27 | "Minimize To Tray": "최소화시 트레이로", 28 | 29 | "Minimize On Startup": "실행시 최소화", 30 | 31 | "Notification when compile is completed": "컴파일이 완료되면 알림", 32 | 33 | "Automatically compile files when project is added or reloaded": "프로젝트가 추가되거나 새로고침시 자동으로 컴파일", 34 | 35 | "Filter:": "필터", 36 | 37 | "e.g": "예) ", 38 | 39 | "Default Options:": "기본 설정", 40 | 41 | "No options.": "선택 없음", 42 | 43 | "compass project configuration instructions" : "프로젝트 디렉토리에서 config.rb파일을 편집하기만 하면 됩니다.
        디렉토리에 이 파일이 없으면 다음을 따라해 생성하실 수 있습니다 :
        프로젝트 항목 우클릭 --> 프로젝트 설정 --> 새로운 설정 --> compass용
        다른 디렉터리에 있는 config.rb. xml파일이 있는 경우, 프로젝트의 루트 디렉터리로 이동하고 \"http_path\" 속성을 수정하세요.", 44 | 45 | "Project Website:": "프로젝트 사이트", 46 | 47 | "Bug Report:": "버그 리포트 : ", 48 | 49 | "[@settings.html]Version:": "버젼", 50 | 51 | "Check Upgrade": "업데이트 확인", 52 | 53 | "Checking...": "확인중...", 54 | 55 | "new version available": "Koala v 지금 업데이트 가능,", 56 | 57 | "Download Now": "지금 다운로드", 58 | 59 | "This is the lastest version.": "현재 최신버젼 입니다.", 60 | 61 | "Thanks:": "도음을 주신분들", 62 | 63 | "Translator:": "번역자 : ", 64 | 65 | "Built-in package versions:": "", 66 | 67 | "Ok": "확인", 68 | 69 | "Cancel": "취소", 70 | 71 | "Default Options": "기본 설정", 72 | 73 | "Advanced": "고급", 74 | 75 | "Advanced Settings": "고급 설정", 76 | 77 | "Using System Commands:": "시스템 명령 사용 :", 78 | 79 | "Libraries Version": "라이브러리 버젼", 80 | 81 | "Maintainers": "유지 관리자", 82 | 83 | "Uninstall This Extension": "이 확장 프로그램 제거", 84 | 85 | "Contributors:": "기여자 : ", 86 | 87 | "Docs:": "문서 :", 88 | 89 | "Help": "도움", 90 | 91 | "Use Custom Ruby": "사용자 정의 Ruby사용", 92 | 93 | "Use the Ruby executable at this path": "사용할 Ruby 실행 파일 경로", 94 | 95 | "Browse Extensions": "확장프로그램 찾아보기", 96 | 97 | "Ignores": "무시", 98 | 99 | "Include Paths": "경로 포함", 100 | 101 | "Default": "기본", 102 | 103 | // notifier.html 104 | "Notification": "알림", 105 | 106 | "Error": "오류", 107 | 108 | "Close": "닫기", 109 | 110 | // log.html 111 | "Log": "로그", 112 | 113 | "Error Log": "에러 로그", 114 | 115 | "Clear All": "모두 지우기", 116 | 117 | // main/settings.jade 118 | "auto compile": "자동으로 컴파일", 119 | 120 | "output style:": "출력 형식:", 121 | 122 | "[@jadetmpl.html]options:": "설정", 123 | 124 | "[@jadetmpl.html]compile": "컴파일", 125 | 126 | // compilers package.json 127 | "Use the System LESS compiler": "시스템 LESS컴파일러 사용", 128 | 129 | "Use the LESS executable at this path": "실행가능한 LESS 경로", 130 | 131 | "Default: lessc": "기본값 : lessc", 132 | 133 | "Use the System Sass compiler": "시스템 SASS컴파일러 사용", 134 | 135 | "Use the Sass executable at this path": "실행가능한 Sass 경로", 136 | 137 | "Default: sass": "기본값 : sass", 138 | 139 | "Use the System Compass compiler": "시스템 Compass컴파일러 사용", 140 | 141 | "Use the Compass executable at this path": "실행가능한 Compass 경로", 142 | 143 | "Default: compass": "기본값 : compass", 144 | 145 | "Use the System CoffeeScript compiler": "시스템 CoffeeScript컴파일러 사용", 146 | 147 | "Use the CoffeeScript executable at this path": "실행가능한 CoffeeScript 경로", 148 | 149 | "Default: coffee": "기본값 : coffee", 150 | 151 | "Use the System Dust compiler": "시스템 Dust컴파일러 사용", 152 | 153 | "Use the Dust executable at this path": "실행가능한 Dust 경로", 154 | 155 | "Default: dustc": "기본값 : dustc", 156 | 157 | "Output Style": "출력 형식" 158 | } -------------------------------------------------------------------------------- /src/app/assets/libs/jquery.hotkeys.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Hotkeys Plugin 3 | * Copyright 2010, John Resig 4 | * Dual licensed under the MIT or GPL Version 2 licenses. 5 | * 6 | * Based upon the plugin by Tzury Bar Yochay: 7 | * http://github.com/tzuryby/hotkeys 8 | * 9 | * Original idea by: 10 | * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ 11 | */ 12 | 13 | (function(jQuery){ 14 | 15 | jQuery.hotkeys = { 16 | version: "0.8+", 17 | 18 | specialKeys: { 19 | 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", 20 | 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 21 | 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 22 | 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 23 | 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/", 24 | 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 25 | 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 188: ",", 190: ".", 26 | 191: "/", 224: "meta" 27 | }, 28 | 29 | shiftNums: { 30 | "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", 31 | "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<", 32 | ".": ">", "/": "?", "\\": "|" 33 | } 34 | }; 35 | 36 | function keyHandler( handleObj ) { 37 | 38 | var origHandler = handleObj.handler, 39 | //use namespace as keys so it works with event delegation as well 40 | //will also allow removing listeners of a specific key combination 41 | //and support data objects 42 | keys = (handleObj.namespace || "").toLowerCase().split(" "); 43 | keys = jQuery.map(keys, function(key) { return key.split("."); }); 44 | 45 | //no need to modify handler if no keys specified 46 | if (keys.length === 1 && (keys[0] === "" || keys[0] === "autocomplete")) { 47 | return; 48 | } 49 | 50 | handleObj.handler = function( event ) { 51 | // Don't fire in text-accepting inputs that we didn't directly bind to 52 | // important to note that $.fn.prop is only available on jquery 1.6+ 53 | if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) || 54 | event.target.type === "text" || $(event.target).prop('contenteditable') == 'true' )) { 55 | return; 56 | } 57 | 58 | // Keypress represents characters, not special keys 59 | var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ], 60 | character = String.fromCharCode( event.which ).toLowerCase(), 61 | key, modif = "", possible = {}; 62 | 63 | // check combinations (alt|ctrl|shift+anything) 64 | if ( event.altKey && special !== "alt" ) { 65 | modif += "alt_"; 66 | } 67 | 68 | if ( event.ctrlKey && special !== "ctrl" ) { 69 | modif += "ctrl_"; 70 | } 71 | 72 | // TODO: Need to make sure this works consistently across platforms 73 | if ( event.metaKey && !event.ctrlKey && special !== "meta" ) { 74 | modif += "meta_"; 75 | } 76 | 77 | if ( event.shiftKey && special !== "shift" ) { 78 | modif += "shift_"; 79 | } 80 | 81 | if ( special ) { 82 | possible[ modif + special ] = true; 83 | 84 | } else { 85 | possible[ modif + character ] = true; 86 | possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true; 87 | 88 | // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" 89 | if ( modif === "shift_" ) { 90 | possible[ jQuery.hotkeys.shiftNums[ character ] ] = true; 91 | } 92 | } 93 | 94 | for ( var i = 0, l = keys.length; i < l; i++ ) { 95 | if ( possible[ keys[i] ] ) { 96 | return origHandler.apply( this, arguments ); 97 | } 98 | } 99 | }; 100 | } 101 | 102 | jQuery.each([ "keydown", "keyup", "keypress" ], function() { 103 | jQuery.event.special[ this ] = { add: keyHandler }; 104 | }); 105 | 106 | })( jQuery ); 107 | -------------------------------------------------------------------------------- /src/app/locales/es_mx/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "Abrir una carpeta", 5 | 6 | "Rename": "Renombrar", 7 | 8 | "Reload": "Recargar", 9 | 10 | "Delete": "Eliminar", 11 | 12 | "Are sure delete this folder?": "¿Realmente desea eliminar esta carpeta?", 13 | 14 | "Project Settings": "Configuración del proyecto", 15 | 16 | "New Settings": "Nueva configuración", 17 | 18 | "Edit Settings": "Editar la configuración", 19 | 20 | "Default": "Por defecto", 21 | 22 | "For LESS": "Para LESS", 23 | 24 | "For Sass": "Para Sass", 25 | 26 | "For Compass": "Para Compass", 27 | 28 | "For CoffeeScript": "Para CoffeeScript", 29 | 30 | // file context item 31 | "Open File": "Abrir archivo", 32 | 33 | "Open Containing Folder": "Abrir la carpeta contenedora", 34 | 35 | "Open Output Folder": "Abrir la carpeta de salida", 36 | 37 | "Set Output Path": "Establecer la ruta de salida", 38 | 39 | "Compile": "Compilar", 40 | 41 | "Batch Compile": "Compilar en lote", 42 | 43 | "Remove": "Remover", 44 | 45 | "Toggle Auto Compile": "Activar/desactivar la compilación automática", 46 | 47 | // tray context item 48 | "Open": "Abrir", 49 | 50 | "Settings": "Configuración", 51 | 52 | "Exit": "Salir", 53 | 54 | // tips 55 | "compiling...": "compilando...", 56 | 57 | "New Version Found": "Se ha encontrado una nueva versión : v${1}, ¿desea descargarla ahora?", 58 | 59 | "Some Compile errors, please see the compile log": "Ocurrieron algunos errores de compilación, por favor revise el registro de compilación.
        ${1} sin problemas, ${2} con errores.", 60 | 61 | "x new file": "${1} archivo nuevo", 62 | 63 | "Network requests failed, please try again": "La conexión de red ha fallado, por favor intente nuevamente", 64 | 65 | "koala-config.json not found, please create it first.": "El archivo koala-config.json no existe, debe crearse antes", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} se ha creado en el directorio del proyecto.
        ¿Desea editarlo ahora?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} ya existe. ¿Desea editarlo?", 70 | 71 | "Please select a folder.": "Por favor elija una carpeta", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "Esta carpeta ha sido añadida, ¿desea agregarla como un nuevo proyecto?", 74 | 75 | "Installing the language pack...": "Instalando el paquete de idioma...", 76 | 77 | "Install the language pack failed:": "La instalación del paquete de idioma ha fallado", 78 | 79 | "Not found the package.json file.": "No se ha encontrado el archivo package.json", 80 | 81 | "Language pack is not complete.": "El paquete de idioma está incompleto", 82 | 83 | "Package.json is not complete.": "package.json está incompleto", 84 | 85 | "Language pack is installed successfully.": "${1} el paquete de idioma se ha instalado correctamente.", 86 | 87 | "language pack update notification": "Una nueva versión del paquete de idioma se encuentra disponible, ¿desea actualizarlo?", 88 | 89 | "Downloading the new language pack...": "Descargando el nuevo paquete de idioma", 90 | 91 | "Language pack auto download failed, try download it manually.": "La descarga automática del paquete de idioma ha fallado, intente hacerlo manualmente", 92 | 93 | "Installing the compiler...": "Instalando el compilador...", 94 | 95 | "The compiler install failed:": "La instalación del compilador ha fallado", 96 | 97 | "Package is not complete": "El paquete no está completo, hacen falta los siguientes campos: ${1}", 98 | 99 | "Compiler pack is installed successfully.": "El compilador \"${1}\" se ha instalado correctamente.", 100 | 101 | "compiler pack update notification": "Se encontraron nuevas versiones de los siguientes compiladores.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "¿Desea desinstalar esta extensión?" 104 | 105 | } -------------------------------------------------------------------------------- /src/app/locales/fr_fr/context.json: -------------------------------------------------------------------------------- 1 | // language pack of context 2 | { 3 | // folder context item 4 | "Open Folder": "Ouvrir un dossier", 5 | 6 | "Rename": "Renommer", 7 | 8 | "Reload": "Recharger", 9 | 10 | "Delete": "Effacer", 11 | 12 | "Are sure delete this folder?": "Voulez-vous vraiment supprimer ce dossier ?", 13 | 14 | "Project Settings": "Préférences du projet", 15 | 16 | "New Settings": "Nouvelles préférences", 17 | 18 | "Edit Settings": "Éditer les préférences", 19 | 20 | "Default": "Par défaut", 21 | 22 | "For LESS": "Pour LESS", 23 | 24 | "For Sass": "Pour Sass", 25 | 26 | "For Compass": "Pour Compass", 27 | 28 | "For CoffeeScript": "Pour CoffeeScript", 29 | 30 | // file context item 31 | "Open File": "Ouvrir un fichier", 32 | 33 | "Open Containing Folder": "Ouvrir le dossier du projet", 34 | 35 | "Open Output Folder": "Ouvrir le dossier d'export", 36 | 37 | "Set Output Path": "Définir le chemin d'export'", 38 | 39 | "Compile": "Compiler", 40 | 41 | "Batch Compile": "Compiler par lot", 42 | 43 | "Remove": "Supprimer", 44 | 45 | "Toggle Auto Compile": "Activer/désactiver la compilation automatique", 46 | 47 | // tray context item 48 | "Open": "Ouvrir", 49 | 50 | "Settings": "Réglages", 51 | 52 | "Exit": "Sortir", 53 | 54 | // tips 55 | "compiling...": "Compilation en cours ...", 56 | 57 | "New Version Found": "Une nouvelle version a été trouvée : v${1}, voulez-vous la télécharger maintenant ?", 58 | 59 | "Some Compile errors, please see the compile log": "Erreurs de compilation. Veuillez consulter le journal de compilation.
        ${1} réussies, ${2} échouées.", 60 | 61 | "x new file": "${1} nouveau fichier", 62 | 63 | "Network requests failed, please try again": "La connexion internet a échoué, veuillez réessayer", 64 | 65 | "koala-config.json not found, please create it first.": "Le fichier koala-config.json n'existe pas, veuillez d'abord le créer.", 66 | 67 | "Settings file was created in the project directory. Do you want to edit it now?": "${1} a été créé dans le dossier du projet.
        Voulez-vous l'éditer maintenant ?", 68 | 69 | "Settings file has already exists. Do you want to edit it?": "${1} existe déjà. Voulez-vous l'éditer ?", 70 | 71 | "Please select a folder.": "Veuillez sélectionner un dossier.", 72 | 73 | "This folder has been added, whether you want to add it as a new project?": "Ce dossier a été ajouté, voulez-vous l'ajouter comme nouveau projet ?", 74 | 75 | "Installing the language pack...": "Installation du pack de traduction ...", 76 | 77 | "Install the language pack failed:": "L'installation du pack de traduction a échoué.", 78 | 79 | "Not found the package.json file.": "Le fichier package.json n'existe pas.", 80 | 81 | "Language pack is not complete.": "Le pack de traduction est incomplet.", 82 | 83 | "Package.json is not complete.": "Le fichier package.json est incomplet.", 84 | 85 | "Language pack is installed successfully.": "${1} le pack de traduction a été installé avec succès.", 86 | 87 | "language pack update notification": "Une nouvelle version du pack de traduction que vous utilisez est disponible, voulez-vous le mettre à jour ?", 88 | 89 | "Downloading the new language pack...": "Téléchargement du nouveau pack de traduction ...", 90 | 91 | "Language pack auto download failed, try download it manually.": "Le téléchargement automatique du pack de traduction a échoué, essayez de le télécharger manuellement.", 92 | 93 | "Installing the compiler...": "Installation du compilateur en cours", 94 | 95 | "The compiler install failed:": "L'installation du compilateur a échoué", 96 | 97 | "Package is not complete": "Le pack n'est pas complet, les champs suivants sont manquants : ${1}", 98 | 99 | "Compiler pack is installed successfully.": "\"${1}\" compilateur a été installé avec succès.", 100 | 101 | "compiler pack update notification": "De nouvelles versions des compilateurs suivants ont été trouvées.
        ${1}", 102 | 103 | "Do you want to uninstall this extension?": "Voulez-vous désinstaller cette extension ?" 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/app/locales/ru_ru/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Minimize": "Минимизировать", 5 | 6 | "Close": "Закрыть", 7 | 8 | "Add Folder": "Добавить папку", 9 | 10 | "Log": "Журнал", 11 | 12 | "Settings": "Настройки", 13 | 14 | "Drag and drop a folder to add project.": "Перетащите сюда папку чтобы открыть проект", 15 | 16 | "Refresh": "Обновить", 17 | 18 | // settings.html 19 | "Settings": "Настройки", 20 | 21 | "General": "Основные", 22 | 23 | "About": "О программе", 24 | 25 | "Language:": "Язык:", 26 | 27 | "Minimize To Tray": "Минимизировать в трэй", 28 | 29 | "Minimize On Startup": "Минимизировать при запуске", 30 | 31 | "Filter:": "Фильтр:", 32 | 33 | "e.g": "Например", 34 | 35 | "Default Options:": "Настройки по умолчанию:", 36 | 37 | "No options.": "Без настроек", 38 | 39 | "compass project configuration instructions" : "Отредактируйте файл config.rb в папке проекта.
        Если в папке нет этого файла, вы можете создать его следующим образом:
        правый клик по папке проекта --> настройки проекта --> новые настройки --> для compass.
        Если файл config.rb в другой папке, переместите его в корень проекта и отредактируйте \"http_path\" атрибут.", 40 | 41 | "Project Website:": "Вебсайт проекта:", 42 | 43 | "Bug Report:": "Сообщения об ошибках:", 44 | 45 | "[@settings.html]Version:": "Версия", 46 | 47 | "Check Upgrade": "Проверить обновления", 48 | 49 | "Checking...": "Проверка...", 50 | 51 | "new version available": "Koala v доступна новая версия,", 52 | 53 | "Download Now": "Загрузить сейчас", 54 | 55 | "This is the lastest version.": "Это последняя версия.", 56 | 57 | "Thanks:": "Спасибо:", 58 | 59 | "Translator:": "Переводчик:", 60 | 61 | "Built-in package versions:": "Версия пакета:", 62 | 63 | "Ok": "ОК", 64 | 65 | "Cancel": "Отмена", 66 | 67 | "Default Options": "Настройки по умолчанию", 68 | 69 | "Advanced": "Расширенные", 70 | 71 | "Advanced Settings": "Расширенные настройки", 72 | 73 | "Using System Commands:": "Использовать системные комманды:", 74 | 75 | "Libraries Version": "Версия библиотеки", 76 | 77 | "Maintainers": "Авторы", 78 | 79 | "Uninstall This Extension": "Деинсталлировать это расширение", 80 | 81 | "Contributors:": "Соавторы:", 82 | 83 | "Docs:": "Документация:", 84 | 85 | "Help": "Помощь", 86 | 87 | "Use Custom Ruby": "Использовать Ruby", 88 | 89 | "Use the Ruby executable at this path": "Путь к Ruby", 90 | 91 | "Browse Extensions": "Расширения", 92 | 93 | "Ignores": "Игнорировать", 94 | 95 | "Include Paths": "Добавить путь", 96 | 97 | "Default": "По умолчанию", 98 | 99 | // notifier.html 100 | "Notification": "Уведомление", 101 | 102 | "Error": "Ошибка", 103 | 104 | "Close": "Закрыть", 105 | 106 | // log.html 107 | "Log": "Журнал", 108 | 109 | "Error Log": "Сообщения об ошибках", 110 | 111 | "Clear All": "Очистить всё", 112 | 113 | // main/settings.jade 114 | "auto compile": "Автокомпиляция", 115 | 116 | "output style:": "Стиль вывода:", 117 | 118 | "[@jadetmpl.html]options:": "", 119 | 120 | "[@jadetmpl.html]compile": "", 121 | 122 | // compilers package.json 123 | "Use the System LESS compiler": "Использовать системный компилятор LESS", 124 | 125 | "Use the LESS executable at this path": "Путь к LESS", 126 | 127 | "Default: lessc": "По умолчанию: lessc", 128 | 129 | "Use the System Sass compiler": "Использовать системный компилятор Sass", 130 | 131 | "Use the Sass executable at this path": "Путь к Sass", 132 | 133 | "Default: sass": "По умолчанию: sass", 134 | 135 | "Use the System Compass compiler": "Использовать системный компилятор Compass", 136 | 137 | "Use the Compass executable at this path": "Путь к Compass", 138 | 139 | "Default: compass": "По умолчанию: compass", 140 | 141 | "Use the System CoffeeScript compiler": "Использовать системный компилятор CoffeScript", 142 | 143 | "Use the CoffeeScript executable at this path": "Путь к Coffescript", 144 | 145 | "Default: coffee": "По умолчанию: coffee", 146 | 147 | "Use the System Dust compiler": "Использовать системный компилятор Dust", 148 | 149 | "Use the Dust executable at this path": "Путь к Dust", 150 | 151 | "Default: dustc": "По умолчанию: dustc", 152 | 153 | "Output Style": "Стиль вывода" 154 | } 155 | -------------------------------------------------------------------------------- /src/app/locales/fi_fi/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Minimize": "Minimoi", 5 | 6 | "Close": "Sulje", 7 | 8 | "Add Folder": "Lisää kansio", 9 | 10 | "Log": "Loki", 11 | 12 | "Settings": "Asetukset", 13 | 14 | "Drag and drop a folder to add project.": "Siirrä ja pudota kansio avataksesi projekti", 15 | 16 | "Refresh": "Päivitä", 17 | 18 | // settings.html 19 | "Settings": "Asetukset", 20 | 21 | "General": "Yleinen", 22 | 23 | "About": "Tietoa", 24 | 25 | "Language:": "Kieli:", 26 | 27 | "Minimize To Tray": "Minimoi kelkkaan", 28 | 29 | "Minimize On Startup": "Minimoi käynnistyksen yhteydessä", 30 | 31 | "Filter:": "Filtteri:", 32 | 33 | "e.g": "esim.", 34 | 35 | "Default Options:": "Oletusasetukset:", 36 | 37 | "No options.": "Ei asetuksia.", 38 | 39 | "compass project configuration instructions" : "Muokkaa tiedostoa config.rb projektikansiossa.
        Jos kansiossa ei ole tätä tiedostoa, voit luoda sen seuraavalla tavalla:
        oikeaklikkaus projektikansiossa --> projektin asetukset --> uudet asetukset --> compassia varten.
        Jos tiedosto config.rb on toisessa kansiossa, siirrä se projektin juureen ja muokkaa \"http_path\" määritettä.", 40 | 41 | "Project Website:": "Projektin kotisivut:", 42 | 43 | "Bug Report:": "Virheen raportointi:", 44 | 45 | "[@settings.html]Version:": "Versio", 46 | 47 | "Check Upgrade": "Tarkista päivitys", 48 | 49 | "Checking...": "Tarkistetaan...", 50 | 51 | "new version available": "Koala v on saatavilla,", 52 | 53 | "Download Now": "Lataa nyt", 54 | 55 | "This is the lastest version.": "Tämä on uusin versio.", 56 | 57 | "Thanks:": "Kiitos:", 58 | 59 | "Translator:": "Kääntäjä:", 60 | 61 | "Built-in package versions:": "Paketin versio:", 62 | 63 | "Ok": "OK", 64 | 65 | "Cancel": "Peruuta", 66 | 67 | "Default Options": "Oletusasetukset", 68 | 69 | "Advanced": "Kehittynyt", 70 | 71 | "Advanced Settings": "Edistyneet asetukset", 72 | 73 | "Using System Commands:": "Käytä järjestelmäkomentoja:", 74 | 75 | "Libraries Version": "Kirjaston versio", 76 | 77 | "Maintainers": "Tekijät", 78 | 79 | "Uninstall This Extension": "Poista tämä liitännäinen", 80 | 81 | "Contributors:": "Avustajat:", 82 | 83 | "Docs:": "Dokumentaatio:", 84 | 85 | "Help": "Apua", 86 | 87 | "Use Custom Ruby": "Käytä mukautettua Rubya", 88 | 89 | "Use the Ruby executable at this path": "Rubyn polku", 90 | 91 | "Browse Extensions": "Liitännäiset", 92 | 93 | "Ignores": "Sivuuttaa", 94 | 95 | "Include Paths": "Lisää polku", 96 | 97 | "Default": "Oletus", 98 | 99 | // notifier.html 100 | "Notification": "Ilmoitus", 101 | 102 | "Error": "Virhe", 103 | 104 | "Close": "Sulje", 105 | 106 | // log.html 107 | "Log": "Loki", 108 | 109 | "Error Log": "Virheloki", 110 | 111 | "Clear All": "Tyhjennä kaikki", 112 | 113 | // main/settings.jade 114 | "auto compile": "Automaattinen käännös", 115 | 116 | "output style:": "Tulostustyyli:", 117 | 118 | "[@jadetmpl.html]options:": "", 119 | 120 | "[@jadetmpl.html]compile": "", 121 | 122 | // compilers package.json 123 | "Use the System LESS compiler": "Käytä järjestelmän LESS kääntäjää", 124 | 125 | "Use the LESS executable at this path": "LESSin polku", 126 | 127 | "Default: lessc": "Oletus: lessc", 128 | 129 | "Use the System Sass compiler": "Käytä järjestelmän Sass kääntäjää", 130 | 131 | "Use the Sass executable at this path": "Sassin polku", 132 | 133 | "Default: sass": "Oletus: sass", 134 | 135 | "Use the System Compass compiler": "Käytä järjestelmän Compass kääntäjää", 136 | 137 | "Use the Compass executable at this path": "Compassin polku", 138 | 139 | "Default: compass": "Oletus: compass", 140 | 141 | "Use the System CoffeeScript compiler": "Käytä järjestelmän CoffeScript kääntäjää", 142 | 143 | "Use the CoffeeScript executable at this path": "Coffescriptin polku", 144 | 145 | "Default: coffee": "Oletus: coffee", 146 | 147 | "Use the System Dust compiler": "Käytä järjestelmän Dust kääntäjää", 148 | 149 | "Use the Dust executable at this path": "Dustin polku", 150 | 151 | "Default: dustc": "Oletus: dustc", 152 | 153 | "Output Style": "Tulostustyyli" 154 | } 155 | -------------------------------------------------------------------------------- /src/app/locales/de_de/views.json: -------------------------------------------------------------------------------- 1 | { 2 | "Minimize": "Minimieren", 3 | 4 | "Close": "Schließen", 5 | 6 | "Add Folder": "Ordner hinzufügen", 7 | 8 | "Log": "Protokoll", 9 | 10 | "Settings": "Einstellungen", 11 | 12 | "Drag and drop a folder to add project.": "Ziehen Sie einen Ordner in dieses Fenster, um ein Projekt hinzuzufügen.", 13 | 14 | "Refresh": "Neu laden", 15 | 16 | "Settings": "Einstellungen", 17 | 18 | "General": "Allgemein", 19 | 20 | "About": "Über", 21 | 22 | "Language:": "Sprache:", 23 | 24 | "Minimize To Tray": "Im Tray minimieren", 25 | 26 | "Minimize On Startup": "Minimiert starten", 27 | 28 | "Filter:": "Filter:", 29 | 30 | "e.g": "zum Beispiel", 31 | 32 | "Default Options:": "Standardoptionen:", 33 | 34 | "No options.": "Keine Optionen.", 35 | 36 | "compass project configuration instructions" : "Bearbeiten Sie die config.rb Datei im Projektverzeichnis.
        Wenn das Verzeichnis keine solche Datei enthält, können Sie so eine erstellen:
        Rechtsklick auf das Projekt -> Projekteinstellungen -> Neue Einstellungen -> Für compass.
        Wenn die config.rb in einem anderen Verzeichnis ist, bewegen Sie das Hauptverzeichnis des Projekts entsprechend und bearbeiten Sie die \"http_path\" Attribute.", 37 | 38 | "Project Website:": "Projektseite:", 39 | 40 | "Bug Report:": "Fehlerberichterstattung:", 41 | 42 | "[@settings.html]Version:": "Version:", 43 | 44 | "Check Upgrade": "Nach Upgrade suchen", 45 | 46 | "Checking...": "Suche...", 47 | 48 | "new version available": "Koala v ist verfügbar,", 49 | 50 | "Download Now": "Jetzt herunterladen", 51 | 52 | "This is the lastest version.": "Dies ist die aktuelle Version.", 53 | 54 | "Thanks:": "Danke an:", 55 | 56 | "Translator:": "Übersetzer:", 57 | 58 | "Built-in package versions:": "Eingebaute Packetversionen:", 59 | 60 | "Ok": "Ok", 61 | 62 | "Cancel": "Abbrechen", 63 | 64 | "Default Options": "Standard Optionen", 65 | 66 | "Advanced": "Erweitert", 67 | 68 | "Advanced Settings": "Erweiterte Einstellungen", 69 | 70 | "Using System Commands:": "Systembefehle benutzen:", 71 | 72 | "Libraries Version": "Bibliotheken Version", 73 | 74 | "Maintainers": "Authoren", 75 | 76 | "Uninstall This Extension": "Diese Erweiterung deinstallieren", 77 | 78 | "Contributors:": "Beitragende:", 79 | 80 | "Docs:": "Dokumentation:", 81 | 82 | "Help": "Hilfe", 83 | 84 | "Use Custom Ruby": "Eigene Ruby version benutzen", 85 | 86 | "Use the Ruby executable at this path": "Ruby Programmdatei unter diesem Pfad benutzen", 87 | 88 | "Browse Extensions": "Erweiterungen durchsuchen", 89 | 90 | "Ignores": "Ignorieren", 91 | 92 | "Include Paths": "Pfade beinhalten", 93 | 94 | "Default": "Standard", 95 | 96 | "Notification": "Benachrichtigung", 97 | 98 | "Error": "Fehler", 99 | 100 | "Close": "Schließen", 101 | 102 | "Log": "Protokoll", 103 | 104 | "Error Log": "Fehlerprotokoll", 105 | 106 | "Clear All": "Alles leeren", 107 | 108 | "auto compile": "automatische Kompilierung", 109 | 110 | "output style:": "Ausgabestil:", 111 | 112 | "[@jadetmpl.html]options:": "Optionen:", 113 | 114 | "[@jadetmpl.html]compile": "Kompilieren", 115 | 116 | "Use the System LESS compiler": "System LESS Kompilierer benutzen", 117 | 118 | "Use the LESS executable at this path": "LESS Programmdatei unter diesem Pfad benutzen", 119 | 120 | "Default: lessc": "Standard: lessc", 121 | 122 | "Use the System Sass compiler": "System Sass Kompilierer benutzen", 123 | 124 | "Use the Sass executable at this path": "Sass Programmdatei unter diesem Pfad benutzen", 125 | 126 | "Default: sass": "Standard: sass", 127 | 128 | "Use the System Compass compiler": "System Compass Kompilierer benutzen", 129 | 130 | "Use the Compass executable at this path": "Compass Programmdatei unter diesem Pfad benutzen", 131 | 132 | "Default: compass": "Standard: compass", 133 | 134 | "Use the System CoffeeScript compiler": "System CoffeeScript Kompilierer benutzen", 135 | 136 | "Use the CoffeeScript executable at this path": "CoffeeScript Programmdatei unter diesem Pfad benutzen", 137 | 138 | "Default: coffee": "Standard: coffee", 139 | 140 | "Use the System Dust compiler": "System Dust Kompilierer benutzen", 141 | 142 | "Use the Dust executable at this path": "Dust Programmdatei unter diesem Pfad benutzen", 143 | 144 | "Default: dustc": "Standard: dustc", 145 | 146 | "Output Style": "Ausgabestil" 147 | } -------------------------------------------------------------------------------- /src/app/scripts/appConfigManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * application config module 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var fs = require('fs'), 8 | path = require('path'), 9 | exec = require('child_process').exec, 10 | util = require('./util'), 11 | FileManager = global.getFileManager(), 12 | $ = global.jQuery; 13 | 14 | // get config from package.json 15 | var appPackage = util.readJsonSync(FileManager.packageJSONFile) || {}; 16 | 17 | // default config of application 18 | var appConfig = {}; 19 | appConfig.languages = []; 20 | appConfig.builtInLanguages = []; 21 | appConfig.defaultIgnores = ["*.min", "min"]; 22 | 23 | // default config of user 24 | var defaultUserConfig = { 25 | appVersion: appPackage.version, 26 | ignores: [], // default ignore file and dir 27 | includePaths: [], 28 | locales: 'en_us', // default locales 29 | minimizeToTray: true, 30 | minimizeOnStartup: false, 31 | notifyOnCompleted: false, 32 | autoCompileOnAdd: true, 33 | useCustomRuby: false, 34 | rubyCommandPath: "", 35 | compilers: {} 36 | }; 37 | 38 | var waitForReplaceFields = ['appVersion', 'compilers']; 39 | 40 | /** 41 | * load user config 42 | */ 43 | function initUserConfig() { 44 | var config = getUserConfig(), 45 | syncAble; 46 | 47 | // sync app config 48 | syncAble = util.syncObject(config, defaultUserConfig) || syncAble; 49 | 50 | // replace the specified settings 51 | if (config.appVersion !== appPackage.version || appPackage.window.debug) { 52 | waitForReplaceFields.forEach(function (key) { 53 | config[key] = defaultUserConfig[key]; 54 | }); 55 | syncAble = true; 56 | } 57 | 58 | if (syncAble) { 59 | fs.writeFileSync(FileManager.settingsFile, JSON.stringify(config, null, '\t')); 60 | } 61 | 62 | //merge user config to global config 63 | for (var j in config) { 64 | appConfig[j] = config[j]; 65 | } 66 | } 67 | 68 | /** 69 | * load user config 70 | * @return {Object} user config 71 | */ 72 | function getUserConfig() { 73 | //no user config, return null 74 | if (!fs.existsSync(FileManager.settingsFile)) { 75 | fs.appendFileSync(FileManager.settingsFile, JSON.stringify(defaultUserConfig, null, '\t')); 76 | return defaultUserConfig; 77 | } 78 | 79 | return util.readJsonSync(FileManager.settingsFile) || defaultUserConfig; 80 | } 81 | 82 | /** 83 | * load languages 84 | */ 85 | function loadLanguages () { 86 | var ret = require('./localesManager.js').loadLanguages(); 87 | appConfig.builtInLanguages = (function () { 88 | return ret.builtIn.map(function (item) { 89 | return item.code 90 | }); 91 | })(); 92 | appConfig.languages = ret.all; 93 | 94 | // check the current locales if be removed 95 | var inLanguages = appConfig.languages.some(function (item) { 96 | return item.code === appConfig.locales; 97 | }) 98 | if (!inLanguages) { 99 | appConfig.locales = defaultUserConfig.locales; 100 | } 101 | } 102 | 103 | /** 104 | * init compiler options 105 | * @param {object} options compiler default options 106 | */ 107 | exports.initCompilerOptions = function (options) { 108 | var config = getUserConfig(), syncAble; 109 | 110 | for (var k in options) { 111 | if (!config.compilers[k]) { 112 | config.compilers[k] = options[k]; 113 | syncAble = true; 114 | } else { 115 | syncAble = util.syncObject(config.compilers[k], options[k]) || syncAble; 116 | } 117 | } 118 | 119 | if (syncAble) { 120 | fs.writeFileSync(FileManager.settingsFile, JSON.stringify(config, null, '\t')); 121 | } 122 | 123 | //merge user config to global config 124 | for (var j in config.compilers) { 125 | appConfig.compilers[j] = config.compilers[j]; 126 | } 127 | } 128 | 129 | /** 130 | * get app config 131 | * @return {Object} app config 132 | */ 133 | exports.getAppConfig = function () { 134 | return appConfig; 135 | }; 136 | 137 | /** 138 | * get app package info 139 | * @return {Object} package object 140 | */ 141 | exports.getAppPackage = function () { 142 | return appPackage; 143 | } 144 | 145 | /** 146 | * Get Global Settings Of Compiler 147 | * @param {[type]} compilerName [description] 148 | * @return {[type]} [description] 149 | */ 150 | exports.getGlobalSettingsOfCompiler = function (compilerName) { 151 | return appConfig.compilers[compilerName]; 152 | } 153 | 154 | //module initialization 155 | initUserConfig(); 156 | loadLanguages(); -------------------------------------------------------------------------------- /src/app/locales/es_mx/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Minimize": "Minimizar", 5 | 6 | "Close": "Cerrar", 7 | 8 | "Add Folder": "Añadir una carpeta", 9 | 10 | "Log": "Registro", 11 | 12 | "Settings": "Configuración", 13 | 14 | "Drag and drop a folder to add project.": "Arrastre y suelte una carpeta para crear un proyecto", 15 | 16 | "Refresh": "Refrescar", 17 | 18 | // settings.html 19 | "Settings": "Configuración", 20 | 21 | "General": "General", 22 | 23 | "About": "Acerca de", 24 | 25 | "Language:": "Idioma", 26 | 27 | "Minimize To Tray": "Minimizar a bandeja", 28 | 29 | "Minimize On Startup": "Minimizar al iniciar", 30 | 31 | "Filter:": "Filtros", 32 | 33 | "e.g": "Ej.", 34 | 35 | "Default Options:": "Opciones por defecto", 36 | 37 | "No options.": "Sin opciones", 38 | 39 | "compass project configuration instructions" : "Simplemente edite el archivo config.rb dentro del directorio del proyeto.
        Si este archivo no existiera, puede crear uno de la siguiente manera:
        clic derecho en el proyecto --> configuración del proyecto --> nueva configuración --> para compass.
        Si el archivo config.rb se encuentra en otra carpeta, colóquelo en la carpeta raíz del proyecto y cambie los attributos \"http_path\" .", 40 | 41 | "Project Website:": "Página web del proyecto", 42 | 43 | "Bug Report:": "Reportar un error", 44 | 45 | "[@settings.html]Version:": "Versión:", 46 | 47 | "Check Upgrade": "Comprobar actualización", 48 | 49 | "Checking...": "Comprobando...", 50 | 51 | "new version available": "Koala v se encuentra disponible,", 52 | 53 | "Download Now": "Descargar ahora", 54 | 55 | "This is the lastest version.": "Esta es la versión más reciente de Koala", 56 | 57 | "Thanks:": "Gracias:", 58 | 59 | "Translator:": "Traductor", 60 | 61 | "Built-in package versions:": "Versiones de los paquetes integrados", 62 | 63 | "Ok": "Aceptar", 64 | 65 | "Cancel": "Cancelar", 66 | 67 | "Default Options": "Opciones por defecto", 68 | 69 | "Advanced": "Avanzada", 70 | 71 | "Advanced Settings": "Configuración avanzada", 72 | 73 | "Using System Commands:": "Usando los comandos del sistema", 74 | 75 | "Libraries Version": "Versiones de las bibliotecas", 76 | 77 | "Maintainers": "Mantenedores", 78 | 79 | "Uninstall This Extension": "Desinstalar esta extensión", 80 | 81 | "Contributors:": "Colaboradores", 82 | 83 | "Docs:": "Documentación", 84 | 85 | "Help": "Ayuda", 86 | 87 | "Use Custom Ruby": "Utilizar un intérprete de Ruby personalizado", 88 | 89 | "Use the Ruby executable at this path": "Utilizar el ejecutable de Ruby en esta ruta", 90 | 91 | "Browse Extensions": "Explorar las extensiones", 92 | 93 | "Ignores": "Ignorar", 94 | 95 | "Include Paths": "Rutas a incluir", 96 | 97 | "Default": "Por defecto", 98 | 99 | // notifier.html 100 | "Notification": "Notificación", 101 | 102 | "Error": "Error", 103 | 104 | "Close": "Cerrar", 105 | 106 | // log.html 107 | "Log": "Registro", 108 | 109 | "Error Log": "Registro de errores", 110 | 111 | "Clear All": "Limpiar todo", 112 | 113 | // main/settings.jade 114 | "auto compile": "compilación automática", 115 | 116 | "output style:": "estilo de salida", 117 | 118 | "[@jadetmpl.html]options:": "opciones:", 119 | 120 | "[@jadetmpl.html]compile": "compilar", 121 | 122 | // compilers package.json 123 | "Use the System LESS compiler": "Utilizar el compilador LESS del sistema", 124 | 125 | "Use the LESS executable at this path": "Utilizar el compilador LESS en esta ruta", 126 | 127 | "Default: lessc": "Por defecto: lessc", 128 | 129 | "Use the System Sass compiler": "Utilizar el compilador Sass del sistema", 130 | 131 | "Use the Sass executable at this path": "Utilizar el compilador Sass en esta ruta", 132 | 133 | "Default: sass": "Por defecto: sass", 134 | 135 | "Use the System Compass compiler": "Utilizar el compilador Compass del sistema", 136 | 137 | "Use the Compass executable at this path": "Utilizar el compilador Sass en esta ruta", 138 | 139 | "Default: compass": "Por defecto: compass", 140 | 141 | "Use the System CoffeeScript compiler": "Utilizar el compilador CoffeeScript del sistema", 142 | 143 | "Use the CoffeeScript executable at this path": "Utilizar el compilador CoffeeScript en esta ruta", 144 | 145 | "Default: coffee": "Por defecto: coffee", 146 | 147 | "Use the System Dust compiler": "Utilizar el compilador Dust del sistema", 148 | 149 | "Use the Dust executable at this path": "Utilizar el compilador de Dust en esta ruta", 150 | 151 | "Default: dustc": "Por defecto: dustc", 152 | 153 | "Output Style": "Estilo de salida" 154 | } -------------------------------------------------------------------------------- /src/app/assets/css/settings.css: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | /* line 5, _util.less */ 3 | .flexbox { 4 | display: -webkit-box; 5 | -webkit-box-orient: horizontal; 6 | } 7 | /* line 4, settings.less */ 8 | body { 9 | overflow: hidden; 10 | padding: 0; 11 | line-height: 25px; 12 | } 13 | /* line 9, settings.less */ 14 | a { 15 | text-decoration: underline; 16 | } 17 | /* line 10, settings.less */ 18 | .hide { 19 | display: none; 20 | } 21 | /* line 12, settings.less */ 22 | #titlebar { 23 | font-size: 14px; 24 | font-weight: bold; 25 | border-bottom: 1px solid #ccc; 26 | text-indent: 10px; 27 | } 28 | /* line 18, settings.less */ 29 | #titlebar .close { 30 | font-weight: bold; 31 | text-indent: 12px; 32 | font-size: 16px; 33 | display: block; 34 | width: 35px; 35 | height: 35px; 36 | float: right; 37 | } 38 | /* line 27, settings.less */ 39 | #titlebar .close:hover { 40 | color: #555555; 41 | } 42 | /* line 31, settings.less */ 43 | #titlebar, 44 | #footer { 45 | height: 35px; 46 | line-height: 35px; 47 | } 48 | /* line 37, settings.less */ 49 | #footer { 50 | position: fixed; 51 | bottom: 0; 52 | width: 100%; 53 | text-align: right; 54 | border-top: 1px solid #CCC; 55 | background-color: #FFF; 56 | } 57 | /* line 45, settings.less */ 58 | #footer button { 59 | min-width: 60px; 60 | margin-right: 10px; 61 | } 62 | /* line 51, settings.less */ 63 | #outer { 64 | padding: 10px 5px 0 0; 65 | } 66 | /* line 52, settings.less */ 67 | #inner { 68 | padding: 0 0 0 10px; 69 | height: 394px; 70 | overflow-y: auto; 71 | display: -webkit-box; 72 | -webkit-box-orient: horizontal; 73 | } 74 | /* line 58, settings.less */ 75 | .win32 #inner { 76 | height: 358px; 77 | } 78 | /* line 60, settings.less */ 79 | .starborder { 80 | content: ""; 81 | position: absolute; 82 | top: 6px; 83 | left: 0; 84 | height: 18px; 85 | width: 4px; 86 | background-color: #999999; 87 | } 88 | /* line 69, settings.less */ 89 | #nav { 90 | width: 140px; 91 | height: 100%; 92 | border-right: 1px solid #ccc; 93 | overflow-x: hidden; 94 | overflow-y: auto; 95 | } 96 | /* line 76, settings.less */ 97 | #nav li { 98 | padding-left: 15px; 99 | line-height: 30px; 100 | height: 30px; 101 | position: relative; 102 | color: #999; 103 | } 104 | /* line 84, settings.less */ 105 | #nav li:hover { 106 | color: #555555; 107 | } 108 | /* line 88, settings.less */ 109 | #nav li.current { 110 | color: #555555; 111 | } 112 | /* line 89, settings.less */ 113 | #nav li.current::after { 114 | content: ""; 115 | position: absolute; 116 | top: 6px; 117 | left: 0; 118 | height: 18px; 119 | width: 4px; 120 | background-color: #999999; 121 | background-color: #555; 122 | } 123 | /* line 94, settings.less */ 124 | .win32 #nav { 125 | width: 130px; 126 | } 127 | /* line 96, settings.less */ 128 | #content { 129 | -webkit-box-flex: 1; 130 | padding-left: 20px; 131 | padding-right: 15px; 132 | height: 100%; 133 | overflow: auto; 134 | } 135 | /* line 103, settings.less */ 136 | #content h2 { 137 | font-weight: bold; 138 | margin-bottom: 10px; 139 | } 140 | /* line 107, settings.less */ 141 | #content h3 { 142 | margin-bottom: 5px; 143 | border-bottom: 1px solid #CCC; 144 | font-weight: bold; 145 | } 146 | /* line 112, settings.less */ 147 | #content .optionbox { 148 | margin-bottom: 15px; 149 | } 150 | /* line 113, settings.less */ 151 | #content label > input[type=text] { 152 | margin-left: 5px; 153 | } 154 | /* line 114, settings.less */ 155 | #content label > input[type=checkbox] { 156 | margin-right: 5px; 157 | } 158 | /* line 115, settings.less */ 159 | #content input[type=text] { 160 | min-width: 200px; 161 | } 162 | /* line 118, settings.less */ 163 | #filter { 164 | padding: 0 3px; 165 | width: 150px; 166 | margin-left: 5px; 167 | } 168 | /* line 124, settings.less */ 169 | #checkupgrade { 170 | margin-left: 20px; 171 | } 172 | /* line 128, settings.less */ 173 | #upgradeloading { 174 | margin-left: 10px; 175 | display: none; 176 | } 177 | /* line 134, settings.less */ 178 | #upgradetips a { 179 | color: red; 180 | } 181 | /* line 135, settings.less */ 182 | #upgradetips .update, 183 | #upgradetips .noupdate { 184 | display: none; 185 | padding: 0 10px; 186 | margin: 10px 0; 187 | } 188 | /* line 140, settings.less */ 189 | #upgradetips .update { 190 | background-color: #FDFD67; 191 | } 192 | /* line 143, settings.less */ 193 | #upgradetips .noupdate { 194 | background-color: #E0E0E0; 195 | } 196 | /* line 148, settings.less */ 197 | #link_download { 198 | margin-right: 5px; 199 | } 200 | /* line 153, settings.less */ 201 | .contributors a { 202 | margin-right: 5px; 203 | } 204 | -------------------------------------------------------------------------------- /src/app/scripts/FileManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * FileManager module 3 | */ 4 | 5 | 'use strict'; 6 | 7 | var fs = require('fs'), 8 | path = require('path'), 9 | util = require('./util'); 10 | 11 | exports.rubyExecPath = process.platform === 'win32' ? path.join(path.dirname(process.execPath), 'ruby', 'bin', 'ruby') : 'ruby'; 12 | 13 | exports.appRootDir = process.cwd(); 14 | exports.appBinDir = path.join(exports.appRootDir, 'bin'); 15 | exports.appDataDir = path.join(exports.appRootDir, 'app'); 16 | exports.appAssetsDir = path.join(exports.appDataDir, 'assets'); 17 | exports.appCompilersDir = path.join(exports.appDataDir, 'scripts/compilers'); 18 | exports.appLocalesDir = path.join(exports.appDataDir, 'locales'); 19 | exports.appScriptsDir = path.join(exports.appDataDir, 'scripts'); 20 | exports.appSettingsDir = path.join(exports.appDataDir, 'settings'); 21 | exports.appViewsDir = path.join(exports.appDataDir, 'views'); 22 | exports.packageJSONFile = path.join(exports.appRootDir, 'package.json'); 23 | 24 | exports.oldUserDataDir = path.join(process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'], '.koala'); 25 | exports.userDataDir = path.join(process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'], (process.platform === 'darwin') ? 'Library/Application Support/Koala/UserData' :'.koala'); 26 | exports.userCompilersDir = path.join(exports.userDataDir, 'compilers'); 27 | exports.userLocalesDir = path.join(exports.userDataDir, 'locales'); 28 | exports.userCacheDir = path.join(exports.userDataDir, 'cache'); 29 | exports.errorLogFile = path.join(exports.userDataDir, 'error.log'); 30 | exports.historyFile = path.join(exports.userDataDir, 'history.json'); 31 | exports.importsFile = path.join(exports.userDataDir, 'imports.json'); 32 | exports.projectsFile = path.join(exports.userDataDir, 'projects.json'); 33 | exports.settingsFile = path.join(exports.userDataDir, 'settings.json'); 34 | 35 | // Create it if the directory is not exists 36 | if (!fs.existsSync(exports.userDataDir)) { 37 | fs.mkdirSync(exports.userDataDir); 38 | } 39 | if (!fs.existsSync(exports.userCompilersDir)) { 40 | fs.mkdirSync(exports.userCompilersDir); 41 | } 42 | if (!fs.existsSync(exports.userLocalesDir)) { 43 | fs.mkdirSync(exports.userLocalesDir); 44 | } 45 | 46 | /** 47 | * tmp dir of system 48 | * @return {String} tmp dir 49 | */ 50 | exports.tmpDir = function () { 51 | var systemTmpDir = 52 | process.env.TMPDIR || 53 | process.env.TMP || 54 | process.env.TEMP || 55 | (process.platform === 'win32' ? 'c:\\windows\\temp' : '/tmp'); 56 | 57 | return path.join(systemTmpDir, 'koala_temp_' + util.createRdStr()); 58 | }; 59 | 60 | /** 61 | * get whether the file is for the OS or not. 62 | * @param {String} file The file to test. 63 | * @return {boolean} `true` if `file` is for the OS, `false` otherwise. 64 | */ 65 | exports.isOSFile = function (file) { 66 | // OS X 67 | if (/^\.(_|DS_Store$)/.test(path.basename(file))) { 68 | return true; 69 | } 70 | // Win 71 | if (/^thumbs\.db$/i.test(path.basename(file))) { 72 | return true; 73 | } 74 | return false; 75 | }; 76 | 77 | /** 78 | * get whether the directory is for the OS or not. 79 | * @param {String} dir The directory to test. 80 | * @return {boolean} `true` if `dir` is for the OS, `false` otherwise. 81 | */ 82 | exports.isOSDir = function (dir) { 83 | // OS X 84 | if (/^\.(fseventsd|Spotlight-V100|TemporaryItems|Trashes)$/.test(path.basename(dir))) { 85 | return true; 86 | } 87 | return false; 88 | }; 89 | 90 | 91 | exports.getAllPackageJSONFiles = function (dir, skipOSDirs) { 92 | var packageJSONs = []; 93 | 94 | skipOSDirs = skipOSDirs || true; 95 | 96 | function walk(root, level) { 97 | var dirList = fs.readdirSync(root); 98 | 99 | for (var i = 0; i < dirList.length; i++) { 100 | var item = dirList[i]; 101 | 102 | if (fs.statSync(path.join(root, item)).isDirectory() && level === 1) { 103 | // Skip OS directories 104 | if (!skipOSDirs || !exports.isOSDir(item)) { 105 | try { 106 | walk(path.join(root, item), level + 1); 107 | } catch (e) {} 108 | } 109 | } else if (item === "package.json" && level === 2) { 110 | packageJSONs.push(path.join(root, item)); 111 | } 112 | } 113 | } 114 | 115 | walk(dir, 1); 116 | 117 | return packageJSONs; 118 | }; 119 | -------------------------------------------------------------------------------- /src/app/locales/pt_br/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Minimize": "Minimizar", 5 | 6 | "Close": "Fechar", 7 | 8 | "Add Folder": "Adicionar Pasta", 9 | 10 | "Log": "Log", 11 | 12 | "Settings": "Configurações", 13 | 14 | "Drag and drop a folder to add project.": "Arraste e solte uma pasta para adicionar projeto", 15 | 16 | "Refresh": "Atualizar", 17 | 18 | // settings.html 19 | "Settings": "Configurações", 20 | 21 | "General": "Geral", 22 | 23 | "About": "Sobre", 24 | 25 | "Language:": "Linguagem", 26 | 27 | "Minimize To Tray": "Minimizar Para Bandeja", 28 | 29 | "Minimize On Startup": "Minimizar Na Inicialização", 30 | 31 | "Filter:": "Fitros", 32 | 33 | "e.g": "", 34 | 35 | "Default Options:": "Configurações Padrão", 36 | 37 | "No options.": "Não há opções", 38 | 39 | "compass project configuration instructions" : "Basta editar o arquivo config.rb sob o diretório do projeto
        Se o diretório não tem esse arquivo, você pode criar um de acordo com o seguinte:.
        Direito do mouse em item de projeto -> configurações do projeto -> novas configurações -.> para compass
        Se o arquivo config.rb em outro diretório, mova para o diretório raiz do projeto e modificar as \"http_path\" atributos.", 40 | 41 | "Project Website:": "Projeto Site", 42 | 43 | "Bug Report:": "Reportar Bug", 44 | 45 | "[@settings.html]Version:": "Versão", 46 | 47 | "Check Upgrade": "Verificar Atualização", 48 | 49 | "Checking...": "Verificando...", 50 | 51 | "new version available": "Koala v já está disponível,", 52 | 53 | "Download Now": "Baixar Agora", 54 | 55 | "This is the lastest version.": "Esta é a versão mais recente do Koala", 56 | 57 | "Thanks:": "Obrigado", 58 | 59 | "Translator:": "Tradutor", 60 | 61 | "Built-in package versions:": "Embutir versões do pacoate", 62 | 63 | "Ok": "Confirmar", 64 | 65 | "Cancel": "Cancelar", 66 | 67 | "Default Options": "Configurações Padrão", 68 | 69 | "Advanced": "Avançado", 70 | 71 | "Advanced Settings": "Configurações Avançadas", 72 | 73 | "Using System Commands:": "Usando Comandos do Sistema", 74 | 75 | "Libraries Version": "Bibliotecas da Versão", 76 | 77 | "Maintainers": "Mantedores", 78 | 79 | "Uninstall This Extension": "Desinstalar Esta Extensão", 80 | 81 | "Contributors:": "Contribuintes", 82 | 83 | "Docs:": "Documentos", 84 | 85 | "Help": "Ajuda", 86 | 87 | "Use Custom Ruby": "Uso Personalizado Ruby", 88 | 89 | "Use the Ruby executable at this path": "Use o executável Ruby neste caminho", 90 | 91 | "Browse Extensions": "Procurar Extensões", 92 | 93 | "Ignores": "Ignorar", 94 | 95 | "Include Paths": "Incluir Caminhos", 96 | 97 | "Default": "Padrão", 98 | 99 | // notifier.html 100 | "Notification": "Notificação", 101 | 102 | "Error": "Erro", 103 | 104 | "Close": "Fechar", 105 | 106 | // log.html 107 | "Log": "Log", 108 | 109 | "Error Log": "Erro Log", 110 | 111 | "Clear All": "Limpar Tudo", 112 | 113 | // main/settings.jade 114 | "auto compile": "Auto Compilação", 115 | 116 | "Line Comments": "Comentários em Linhas", 117 | 118 | "Debug Info": "Informações da Depuração", 119 | 120 | "Strict Math": "Rigorosa Matemática", 121 | 122 | "Strict Units": "Unidades Rígidas", 123 | 124 | "output style:": "Estilo de Saída", 125 | 126 | "[@jadetmpl.html]options:": "Opções", 127 | 128 | "[@jadetmpl.html]compile": "Compilar", 129 | 130 | // compilers package.json 131 | "Use the System LESS compiler": "Use o Sistema Compilador LESS", 132 | 133 | "Use the LESS executable at this path": "Use o executável LESS neste caminho", 134 | 135 | "Default: lessc": "Padrão: lessc", 136 | 137 | "Use the System Sass compiler": "Utilizar o Sistema Sass compilador", 138 | 139 | "Use the Sass executable at this path": "Use o executável Sass neste caminho", 140 | 141 | "Default: sass": "Padrão: sass", 142 | 143 | "Compass Mode": "Modo Compass", 144 | 145 | "Unix New Lines": "Novas Linhas Unix", 146 | 147 | "Use the System Compass compiler": "Utilizar o Sistema Compass compilador", 148 | 149 | "Use the Compass executable at this path": "Use o executável Compass neste caminho", 150 | 151 | "Default: compass": "Padrão: compass", 152 | 153 | "Use the System CoffeeScript compiler": "Utilizar o Sistema CoffeeScript compilador", 154 | 155 | "Use the CoffeeScript executable at this path": "Use o executável CoffeeScript neste caminho", 156 | 157 | "Default: coffee": "Padrão: coffee", 158 | 159 | "Use the System Dust compiler": "Utilizar o Sistema Dust compilador", 160 | 161 | "Use the Dust executable at this path": "Use o executável Dust neste caminho", 162 | 163 | "Default: dustc": "Padrão: dustc", 164 | 165 | "Output Style": "Estilo de Saída" 166 | } -------------------------------------------------------------------------------- /src/app/locales/it_it/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Drag and drop a folder to add project.": "Trascina una cartella per aggiungere un progetto.", 5 | "Minimize": "Minimizza", 6 | 7 | "Close": "Chiudi", 8 | 9 | "Add Folder": "Aggiungi cartella", 10 | 11 | "Log": "Log", 12 | 13 | "Settings": "Impostazioni", 14 | 15 | "Drag and drop a folder to add project.": "Trascina una cartella per aggiungere un progetto.", 16 | 17 | "Refresh": "Aggiorna", 18 | 19 | // settings.html 20 | "Settings": "Impostazioni", 21 | 22 | "General": "Generali", 23 | 24 | "About": "Informazioni", 25 | 26 | "Language:": "Lingua", 27 | 28 | "Minimize To Tray": "Minimizza", 29 | 30 | "Minimize On Startup": "Minimizza all'avvio", 31 | 32 | "Filter:": "Filtra:", 33 | 34 | "Use System Libs:": "Utilizza libreria di sistema:", 35 | 36 | "use system libs description": "Seleziona i linguaggi che utilizzano le librerie di sistema invece delle librerie incluse in koala.", 37 | "e.g": "es.", 38 | 39 | "Default Options:": "Opzioni predefinite:", 40 | 41 | "No options.": "Nessuna opzione.", 42 | 43 | "compass project configuration instructions" : "Modifica il file config.rb nella directory del progetto. Se la directory non contiene questo file, puoi crearne uno come segue: click destro su project item --> project settings --> new settings --> for compass. Se il file config.rb si trova in una directory diversa, spostalo nella directory principale del progetto e modifica l'attributo \"http_path\"", 44 | 45 | "Project Website:": "Sito del progetto", 46 | 47 | "Bug Report:": "Rapporto Bug", 48 | 49 | "[@settings.html]Version:": "", 50 | 51 | "Check Upgrade": "Controlla Aggiornamenti", 52 | 53 | "Checking...": "Verifica...", 54 | 55 | "new version available": "Koala v è ora disponibile,", 56 | 57 | "Download Now": "Scarica ora", 58 | 59 | "This is the lastest version.": "Questa è l'ultima versione di Koala.", 60 | 61 | "Thanks:": "Grazie:", 62 | 63 | "Translator:": "Traduttore:", 64 | 65 | "Built-in package versions:": "Versione inclusa:", 66 | 67 | "Ok": "Ok", 68 | 69 | "Cancel": "Annulla", 70 | 71 | "Default Options": "Opzioni predefinite", 72 | 73 | "Advanced": "Avanzate", 74 | 75 | "Advanced Settings": "Impostazioni avanzate", 76 | 77 | "Using System Commands:": "Utilizza il comando di sistema", 78 | 79 | "Libraries Version": "Versione librerie", 80 | 81 | "Maintainers": "Maintainers", 82 | 83 | "Uninstall This Extension": "Disinstalla questa estensione", 84 | 85 | "Contributors:": "Contributori", 86 | 87 | "Docs:": "Documentazione", 88 | 89 | "Help": "Aiuto", 90 | 91 | "Use Custom Ruby": "Usa Ruby personalizzato", 92 | 93 | "Use the Ruby executable at this path": "Usa l'eseguibile Ruby in questo percorso", 94 | 95 | "Browse Extensions": "Estensioni", 96 | 97 | "Ignores": "Ignora", 98 | 99 | "Include Paths": "Percorsi inclusi", 100 | 101 | "Default": "Predefinito", 102 | 103 | // notifier.html 104 | "Notification": "Notifica", 105 | 106 | "Error": "Errore", 107 | 108 | "Close": "Chiudi", 109 | 110 | // log.html 111 | "Log": "Log", 112 | 113 | "Error Log": "Log Errori", 114 | 115 | "Clear All": "Cancella tutto", 116 | 117 | // main/settings.jade 118 | "auto compile": "Compilazione Automatica", 119 | 120 | "output style:": "Style output", 121 | 122 | "[@jadetmpl.html]options:": "Opzioni:", 123 | 124 | "[@jadetmpl.html]compile": "Compila", 125 | 126 | // compilers package.json 127 | "Use the System LESS compiler": "Utilizza il compilatore LESS di sistema", 128 | 129 | "Use the LESS executable at this path": "Utilizza l'eseguibile LESS in questo percorso", 130 | 131 | "Default: lessc": "Predefinito: lessc", 132 | 133 | "Use the System Sass compiler": "Utilizza il compilatore Sass di sistema", 134 | 135 | "Use the Sass executable at this path": "Utilizza l'eseguibile Sass in questo percorso", 136 | 137 | "Default: sass": "Predefinito: sass", 138 | 139 | "Use the System Compass compiler": "Utilizza il compilatore Compass di sistema", 140 | 141 | "Use the Compass executable at this path": "Utilizza l'eseguibile Compass in questo percorso", 142 | 143 | "Default: compass": "Predefinito: compass", 144 | 145 | "Use the System CoffeeScript compiler": "Utilizza il compilatore CoffeeScript di sistema", 146 | 147 | "Use the CoffeeScript executable at this path": "Utilizza l'eseguibile CoffeeScript in questo percorso", 148 | 149 | "Default: coffee": "Predefinito: coffee", 150 | 151 | "Use the System Dust compiler": "Utilizza il compilatore Dust di sistema", 152 | 153 | "Use the Dust executable at this path": "Utilizza l'eseguibile Dust in questo percorso", 154 | 155 | "Default: dustc": "Predefinito: dustc", 156 | 157 | "Output Style": "Stile Output" 158 | } 159 | -------------------------------------------------------------------------------- /src/app/scripts/compilers/CssCompiler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS min compiler 3 | */ 4 | 'use strict'; 5 | 6 | var fs = require('fs-extra'), 7 | path = require('path'), 8 | FileManager = global.getFileManager(), 9 | common = require('./common.js'), 10 | Compiler = require(FileManager.appScriptsDir + '/Compiler.js'); 11 | 12 | /** 13 | * CSS Compiler 14 | * @param {object} config compiler config 15 | */ 16 | function CssCompiler(config) { 17 | Compiler.call(this, config); 18 | } 19 | require('util').inherits(CssCompiler, Compiler); 20 | 21 | module.exports = CssCompiler; 22 | 23 | /** 24 | * compile css file 25 | * @param {Object} file compile file object 26 | * @param {Object} emitter compile event emitter 27 | */ 28 | CssCompiler.prototype.compile = function(file, emitter) { 29 | var CleanCSS = require('clean-css'); 30 | var rootPath = path.dirname(file.src); 31 | var self = this; 32 | 33 | var options = { 34 | rebaseTo: rootPath, 35 | inline: file.settings.combineImport ? 'local' : 'none', 36 | }; 37 | 38 | if (file.settings.outputStyle != "yuicompress") { 39 | options.format = 'keep-breaks'; 40 | } 41 | 42 | var result = new CleanCSS(options).minify({[file.src]: {styles: fs.readFileSync(file.src, 'utf-8')}}); 43 | 44 | if (file.settings.autoprefix) { 45 | common.autoprefixCSS(file.settings, result.styles, outputCSS); 46 | } else { 47 | outputCSS(result.styles); 48 | } 49 | 50 | function outputCSS(css) { 51 | // convert background image to base64 & append timestamp 52 | var resultCss = convertImageUrl(result.styles, rootPath, file.settings.appendTimestamp); 53 | 54 | if (file.settings.combineImport && result.inlinedStylesheets.length > 1) { 55 | self.watchImports(result.inlinedStylesheets.slice(1), file.src); 56 | } 57 | 58 | fs.outputFile(file.output, resultCss, function(err) { 59 | if (err) { 60 | emitter.emit('fail'); 61 | } else { 62 | emitter.emit('done'); 63 | } 64 | emitter.emit('always'); 65 | }); 66 | } 67 | }; 68 | 69 | 70 | /** 71 | * convert external image file to data URIs 72 | * @param {String} css css code 73 | * @param {String} rootPath the css file path 74 | * @param {Boolean} timestamp whether append timestamp 75 | * @return {String} the converted css code 76 | */ 77 | function convertImageUrl (css, rootPath, timestamp) { 78 | css = css.replace(/background.+?url.?\(.+?\)/gi, function (matchStr) { 79 | 80 | var str = matchStr, 81 | originalUrl = str.match(/url.?\((.+)\)/)[0]; // get original url 82 | 83 | var str = str.replace(/\'|\"/g, '').match(/url.?\((.+)\)/); 84 | 85 | // match result is null 86 | if (!str || !str[1]) { 87 | return matchStr; 88 | } 89 | 90 | str = str[1].trim(); 91 | var url = str.split('?')[0], 92 | param = str.split('?')[1]; 93 | 94 | if (param !== 'base64' && timestamp === true) { 95 | return matchStr.replace(originalUrl, 'url('+ url + '?' + createTimestamp() +')'); 96 | } 97 | // not convert of absolute url 98 | else if (param !== 'base64' || url.indexOf('/') === 0 || url.indexOf('http') === 0) { 99 | return matchStr; 100 | } 101 | var dataUrl = img2base64(url, rootPath); 102 | 103 | // replace original url with dataurl 104 | return matchStr.replace(originalUrl, 'url('+ dataUrl +')'); 105 | }); 106 | return css; 107 | } 108 | 109 | 110 | /** 111 | * convert image to base64 112 | * @param {url} image url 113 | * @param {String} rootPath the css file path 114 | */ 115 | function img2base64(url, rootPath){ 116 | var type = url.split('.').pop().toLowerCase(), 117 | prefix = 'data:image/' + type + ';base64,'; 118 | 119 | var file = path.join(rootPath, url); 120 | try { 121 | var imageBuf = fs.readFileSync(file); 122 | return prefix + imageBuf.toString("base64"); 123 | } catch(err) { 124 | // the file doesn't exist 125 | return url; 126 | } 127 | } 128 | 129 | /** 130 | * create timestamp 131 | */ 132 | function createTimestamp() { 133 | var date = new Date(); 134 | var year = date.getFullYear().toString().substring(2,4); 135 | var mon = date.getMonth().toString().length == 2 ? date.getMonth()+1 : '0'+(date.getMonth()+1); 136 | var day = date.getDate().toString().length == 2 ? date.getDate() : '0'+date.getDate(); 137 | var hour = date.getHours().toString().length == 2 ? date.getHours() : '0'+date.getHours(); 138 | var min = date.getMinutes().toString().length == 2 ? date.getMinutes() : '0'+date.getMinutes(); 139 | 140 | return year + mon + day + hour + min; 141 | } -------------------------------------------------------------------------------- /src/app/locales/fr_fr/views.json: -------------------------------------------------------------------------------- 1 | // language pack of views 2 | { 3 | // main.html 4 | "Drag and drop a folder to add project.": "Glissez-déposez un dossier pour créer un projet", 5 | 6 | "Minimize": "Minimiser", 7 | 8 | "Close": "Fermer", 9 | 10 | "Add Folder": "Ajouter un dossier", 11 | 12 | "Log": "Journal", 13 | 14 | "Settings": "Préférences", 15 | 16 | "Drag and drop a folder to add project.": "Glissez-déposez un dossier pour créer un projet", 17 | 18 | "Refresh": "Rafraichir", 19 | 20 | // settings.html 21 | "Settings": "Préférences", 22 | 23 | "General": "Général", 24 | 25 | "About": "À propos", 26 | 27 | "Language:": "Langue", 28 | 29 | "Minimize To Tray": "Minimiser", 30 | 31 | "Minimize On Startup": "Minimiser au démarrage", 32 | 33 | "Filter:": "Filtrer :", 34 | 35 | "Use System Libs:": "Utiliser les librairies du système :", 36 | 37 | "use system libs description": "Sélectionnez les languages qui utiliseront les librairies système à la place des librairies incluses dans koala.", 38 | 39 | "e.g": "ex.", 40 | 41 | "Default Options:": "Options par défaut :", 42 | 43 | "No options.": "Pas d'options.", 44 | 45 | "compass project configuration instructions" : "Editer simplement le fichier config.rb dans le dossier du projet.
        Si le fichier n'existe pas, vous pouvez le créer de la manière suivante :
        clic droit sur le projet --> réglages du projet --> nouveaux réglages --> pour compass.
        Si le fichier config.rb est dans un autre dossier, placez le dans le dossier racine du projet et modifiez l'attribut \"http_path\".", 46 | 47 | "Project Website:": "Site internet du projet", 48 | 49 | "Bug Report:": "Rapport d'erreur", 50 | 51 | "[@settings.html]Version:": "Version :", 52 | 53 | "Check Upgrade": "Vérifier les mises à jour", 54 | 55 | "Checking...": "Vérification ...", 56 | 57 | "new version available": "Koala v est maintenant disponible", 58 | 59 | "Download Now": "Télécharger maintenant", 60 | 61 | "This is the lastest version.": "Vous avez la dernière version de Koala.", 62 | 63 | "Thanks:": "Merci :", 64 | 65 | "Translator:": "Traducteur :", 66 | 67 | "Built-in package versions:": "Versions du paquet intégré :", 68 | 69 | "Ok": "Valider", 70 | 71 | "Cancel": "Annuler", 72 | 73 | "Default Options": "Options par défaut", 74 | 75 | "Advanced": "Avancé", 76 | 77 | "Advanced Settings": "Paramètres avancés", 78 | 79 | "Using System Commands:": "Utiliser les commandes système :", 80 | 81 | "Libraries Version": "Version des bibliothèques", 82 | 83 | "Maintainers": "Mainteneurs", 84 | 85 | "Uninstall This Extension": "Désinstaller cette extension", 86 | 87 | "Contributors:": "Contributeurs :", 88 | 89 | "Docs:": "Documentation", 90 | 91 | "Help": "Aide", 92 | 93 | "Use Custom Ruby": "Utiliser ruby personnalisé", 94 | 95 | "Use the Ruby executable at this path": "Utiliser les exécutables ruby de ce chemin", 96 | 97 | "Browse Extensions": "Lister les extensions", 98 | 99 | "Ignores": "Ignorer", 100 | 101 | "Include Paths": "Chemin inclus", 102 | 103 | "Default": "Defaut", 104 | 105 | // notifier.html 106 | "Notification": "Notification", 107 | 108 | "Error": "Erreur", 109 | 110 | "Close": "Fermer", 111 | 112 | // log.html 113 | "Log": "Log", 114 | 115 | "Error Log": "Log d'erreur", 116 | 117 | "Clear All": "Tout effacer", 118 | 119 | // main/settings.jade 120 | "auto compile": "compiler automatiquement", 121 | 122 | "output style:": "exporter les styles", 123 | 124 | "[@jadetmpl.html]options:": "options :", 125 | 126 | "[@jadetmpl.html]compile": "compiler", 127 | 128 | // compilers package.json 129 | "Use the System LESS compiler": "Utiliser le compilateur LESS du système", 130 | 131 | "Use the LESS executable at this path": "Utiliser l'exécutable LESS de ce chemin", 132 | 133 | "Default: lessc": "Par défaut : lessc", 134 | 135 | "Use the System Sass compiler": "Utiliser le compilateur Sass du système", 136 | 137 | "Use the Sass executable at this path": "Utiliser l'exécutable Sass de ce chemin", 138 | 139 | "Default: sass": "Par défaut : sass", 140 | 141 | "Use the System Compass compiler": "Utiliser le compilateur Compass du système", 142 | 143 | "Use the Compass executable at this path": "Utiliser l'exécutable Sass de ce chemin", 144 | 145 | "Default: compass": "Par défaut : compass", 146 | 147 | "Use the System CoffeeScript compiler": "Utiliser le compilateur CoffeeScript du système", 148 | 149 | "Use the CoffeeScript executable at this path": "Utiliser l'exécutable CoffeeScript de ce chemin", 150 | 151 | "Default: coffee": "Par défaut : coffee", 152 | 153 | "Use the System Dust compiler": "Utiliser le compilateur Dust du système", 154 | 155 | "Use the Dust executable at this path": "Utiliser l'exécutable Dust de ce chemin", 156 | 157 | "Default: dustc": "Par défaut : dustc", 158 | 159 | "Output Style": "Style de sortie" 160 | } 161 | --------------------------------------------------------------------------------