Skip to content

Commit

Permalink
chrome package app compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzhan committed May 19, 2016
1 parent bdad47b commit 0b342af
Show file tree
Hide file tree
Showing 41 changed files with 2,341 additions and 125 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Expand Up @@ -30,6 +30,7 @@
"ZeroClipboard":true,
"confirm":true,
"prompt": true,
"showdown": true
"showdown": true,
"chrome": true
}
}
22 changes: 21 additions & 1 deletion Gruntfile.js
Expand Up @@ -55,7 +55,27 @@ module.exports = function (grunt) {
cwd: 'src/img/',
src: '**/*',
dest:'dist/img/'
}
},
chrome: {
expand: true,
cwd: 'src/chrome-app/',
src: '**/*',
dest:'dist/'
},
components: {
expand: true,
cwd: 'bower_components/',
src: [
'jquery/dist/jquery.min.js',
'bootstrap/dist/js/bootstrap.min.js',
'bootstrap/dist/css/bootstrap.min.css',
'bootstrap/dist/fonts/**',
'bootstrap-markdown/css/bootstrap-markdown.min.css',
'bootstrap-markdown/js/bootstrap-markdown.js',
'bootstrap-markdown/locale/bootstrap-markdown.zh.js',
'showdown/dist/showdown.min.js'],
dest: "dist/components/"
}
},
clean: ['dist'],
dotpl: require('./localization')(grunt)
Expand Down
13 changes: 3 additions & 10 deletions README.md
@@ -1,7 +1,7 @@
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Markdown Notepad([中文](READ_zh-CN.md))
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Markdown Notes([中文](README_zh-CN.md))

> An online markdown editor,the notepad on the web.Awesome features buit-in multi-tabs,autosaving,inserting local image without upload,paste the screen capture and so on.
>> [**Getting Started**](http://zzzhan.github.io/markdown-notepad/ 'Online Markdown Editor')
> This is an awesome tool on the web for markdown text editing.Awesome features buit-in: multi-tabs,autosaving,inserting local image without upload,paste the screen capture and so on.
>> [**Getting Started**](http://zzzhan.github.io/markdown-notepad/ 'Online Markdown Editor')<br> [![Offline Edition](https://developer.chrome.com/webstore/images/ChromeWebStore_Badge_v2_206x58.png)](https://chrome.google.com/webstore/detail/markdown-notes/maiemhinajnfghcmdlabcelecgljache 'Offline Edition')
## Features

Expand Down Expand Up @@ -41,13 +41,6 @@

* <kbd>F5</kbd>: Markdown preview

## Known Issues

* With Safari, the saving will open in a new window instead of saving.Then you need to press <kbd>⌘</kbd>+<kbd>S</kbd> to save the file after it is opened
* Paste image not support firefox so far
* Same files will open in seperate tab
* Not testing on mobile browsers

## Credits

* Pascal Deschênes & Devyn Stott<br/>
Expand Down
13 changes: 3 additions & 10 deletions README_zh-CN.md
@@ -1,7 +1,7 @@
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Markdown记事本
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Markdown笔记

> Markdown编辑器,网络上免费,小巧的Markdown记事本.内置多标签支持,自动保存,插入图片免上传,屏幕截图粘贴等等,功能丰富,是一个很棒的在线工具.
>> [**开始使用**](http://zzzhan.github.io/markdown-notepad/ '在线Markdown编辑器')
> 网络上免费,小巧的Markdown笔记.内置多标签支持,自动保存,插入图片免上传,屏幕截图粘贴等等,功能丰富,是一个很棒的在线工具.
>> [**开始使用**](http://zzzhan.github.io/markdown-notepad/ '在线Markdown编辑器')<br> [![离线版本](https://developer.chrome.com/webstore/images/ChromeWebStore_Badge_v2_206x58.png)](https://chrome.google.com/webstore/detail/markdown-notes/maiemhinajnfghcmdlabcelecgljache '离线版本')
## 功能

Expand Down Expand Up @@ -37,13 +37,6 @@

* <kbd>F5</kbd>: Markdown预览

## 已知问题

* 使用Safari时, 当点击保存将弹出新窗口,这时你需要再按<kbd>⌘</kbd>+<kbd>S</kbd>组合键保存
* 粘贴图片暂不支持`Firefox`
* 打开同一个文件时将在不同的标签显示
* 未在移动端浏览器中测试

## 感谢

* Pascal Deschênes & Devyn Stott<br/>
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Expand Up @@ -30,6 +30,7 @@
],
"dependencies": {
"bootstrap-markdown": "^2.10.0",
"showdown": "^1.3.0"
"showdown": "^1.3.0",
"bootbox.js": "bootbox#^4.4.0"
}
}
29 changes: 29 additions & 0 deletions dist/ABOUT.md
@@ -0,0 +1,29 @@
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Markdown Notes

> # **Markdown Notes**
[![Offline Edition](https://developer.chrome.com/webstore/images/ChromeWebStore_Badge_v2_206x58.png)](https://chrome.google.com/webstore/detail/markdown-notes/maiemhinajnfghcmdlabcelecgljache 'Offline Edition')

> ## Author
> [zzzhan](https://github.com/zzzhan)
> ## Feedback
> [Give a suggection or report a bug](https://github.com/zzzhan/markdown-notepad/issues/new)

> ## Contact
> [shapefly@gmail.com](mailto:shapefly@gmail.com)
> ## Credits
> * Pascal Deschênes & Devyn Stott<br/>
Authors of [showdown](https://github.com/showdownjs/showdown)

> * Taufan Aditya<br/>
Author of [bootstrap-markdown](https://github.com/toopay/bootstrap-markdown)

> ## **License**
> MIT
29 changes: 29 additions & 0 deletions dist/ABOUT_zh-CN.md
@@ -0,0 +1,29 @@
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Markdown笔记

> # **Markdown笔记**
[![离线版本](https://developer.chrome.com/webstore/images/ChromeWebStore_Badge_v2_206x58.png)](https://chrome.google.com/webstore/detail/markdown-notes/maiemhinajnfghcmdlabcelecgljache '离线版本')

> ### **作者**
> [zzzhan](https://github.com/zzzhan)
> ### **反馈**
> [给个建议或问题](https://github.com/zzzhan/markdown-notepad/issues/new)

> ### **联系我们**
> [shapefly@gmail.com](mailto:shapefly@gmail.com)
> ## **感谢**
> * Pascal Deschênes & Devyn Stott<br/>
[showdown](https://github.com/showdownjs/showdown)的作者

> * Taufan Aditya<br/>
[bootstrap-markdown](https://github.com/toopay/bootstrap-markdown)的作者

> ### **许可**
> MIT
11 changes: 2 additions & 9 deletions WELCOME.md → dist/WELCOME.md
@@ -1,6 +1,6 @@
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Welcome to Markdown Notepad
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) Welcome to Markdown Notes

> This is an awesome tool on the web for markdown text editing.What you are reading now was edited using this tool by myself.You can press the switch button <kbd>Preview</kbd> to see the markdown text. For markdown newbie, you can learn the [markdown syntax](http://daringfireball.net/projects/markdown/syntax). This tool is free, enjoy it! Welcome any feedbacks:)
> This is an awesome tool on the web for markdown text editing.What you are reading now was edited using this tool by myself.You can press the switch button <kbd>Preview</kbd> to see the markdown text. For markdown newbie, you can learn the [markdown syntax](http://daringfireball.net/projects/markdown/syntax). This tool is free, enjoy it! Welcome any [feedbacks](https://github.com/zzzhan/markdown-notepad/issues):)

## Features
Expand Down Expand Up @@ -41,13 +41,6 @@

* <kbd>F5</kbd>: Markdown preview

## Known Issues

* With Safari, the saving will open in a new window instead of saving.Then you need to press <kbd>⌘</kbd>+<kbd>S</kbd> to save the file after it is opened
* Paste image not support firefox so far
* Same files will open in seperate tab
* Not testing on mobile browsers

## Credits

* Pascal Deschênes & Devyn Stott<br/>
Expand Down
11 changes: 2 additions & 9 deletions WELCOME_zh-CN.md → dist/WELCOME_zh-CN.md
@@ -1,6 +1,6 @@
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) 欢迎使用Markdown记事本
# ![favicon](http://zzzhan.github.io/markdown-notepad/dist/img/favicon-96x96.png) 欢迎使用Markdown笔记

> 这是一个很棒的Markdown编辑器.你现在看到的内容就是使用该工具所写的.你可以点击<kbd>预览</kbd>按钮切换查看该Markdown文本. 对于Markdown新手,你可以阅读[Markdown语法](https://raw.githubusercontent.com/riku/Markdown-Syntax-CN/master/syntax.md).尽情使用吧,该工具是免费的! 如有问题欢迎反馈:)
> 这是一个很棒的Markdown编辑器.你现在看到的内容就是使用该工具所写的.你可以点击<kbd>预览</kbd>按钮切换查看该Markdown文本. 对于Markdown新手,你可以阅读[Markdown语法](https://raw.githubusercontent.com/riku/Markdown-Syntax-CN/master/syntax.md).尽情使用吧,该工具是免费的! 如有问题欢迎[反馈](https://github.com/zzzhan/markdown-notepad/issues)

## 功能
Expand Down Expand Up @@ -37,13 +37,6 @@

* <kbd>F5</kbd>: Markdown预览

## 已知问题

* 使用Safari时, 当点击保存将弹出新窗口,这时你需要再按<kbd>⌘</kbd>+<kbd>S</kbd>组合键保存
* 粘贴图片暂不支持`Firefox`
* 打开同一个文件时将在不同的标签显示
* 未在移动端浏览器中测试

## 感谢

* Pascal Deschênes & Devyn Stott<br/>
Expand Down
11 changes: 11 additions & 0 deletions dist/_locales/en/messages.json
@@ -0,0 +1,11 @@
{
"appName": {
"message": "Markdown Notes"
},
"appDesc": {
"message": "Markdown editor, the BEST or NOTHING!"
},
"local_launch_path": {
"message": "index.html"
}
}
11 changes: 11 additions & 0 deletions dist/_locales/zh/messages.json
@@ -0,0 +1,11 @@
{
"appName": {
"message": "Markdown笔记"
},
"appDesc": {
"message": "Markdown笔记,最好用的markdown编辑器"
},
"local_launch_path": {
"message": "index_zh-CN.html"
}
}
10 changes: 10 additions & 0 deletions dist/background.js
@@ -0,0 +1,10 @@
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create(chrome.i18n.getMessage("local_launch_path"), {
outerBounds: {
width: Math.round(screen.width * 0.85),
height: Math.round(screen.height * 0.85),
minWidth: 750,
minHeight: 330
},
frame: "none"});
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b342af

Please sign in to comment.