mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-23 14:41:44 +00:00
Merge branch 'master' into Design-update
This commit is contained in:
4
LICENSE
4
LICENSE
@@ -1,8 +1,8 @@
|
|||||||
GPL-3.0
|
GPL-3.0
|
||||||
|
|
||||||
Boostnote - the simplest note app
|
Boostnote - an open source note-taking app made for programmers just like you.
|
||||||
|
|
||||||
Copyright (C) 2016 MAISIN&CO.
|
Copyright (C) 2017 Maisin&Co., Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -83,37 +83,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
'Cmd-T': function (cm) {
|
'Cmd-T': function (cm) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
},
|
},
|
||||||
Enter: (cm) => {
|
Enter: 'newlineAndIndentContinueMarkdownList'
|
||||||
const cursor = cm.getCursor()
|
|
||||||
const line = cm.getLine(cursor.line)
|
|
||||||
let bulletType
|
|
||||||
if (line.trim().startsWith('- ')) {
|
|
||||||
bulletType = 1 // dash
|
|
||||||
} else if (line.trim().startsWith('* ')) {
|
|
||||||
bulletType = 2 // star
|
|
||||||
} else if (line.trim().startsWith('+ ')) {
|
|
||||||
bulletType = 3 // plus
|
|
||||||
} else {
|
|
||||||
bulletType = 0 // not a bullet
|
|
||||||
}
|
|
||||||
const numberedListRegex = /^(\d+)\. .+/
|
|
||||||
const match = line.trim().match(numberedListRegex)
|
|
||||||
if (bulletType !== 0 || match) {
|
|
||||||
cm.execCommand('newlineAndIndent')
|
|
||||||
const range = {line: cursor.line + 1, ch: cm.getLine(cursor.line + 1).length}
|
|
||||||
if (match) {
|
|
||||||
cm.replaceRange((parseInt(match[1]) + 1) + '. ', range)
|
|
||||||
} else if (bulletType === 1) {
|
|
||||||
cm.replaceRange('- ', range)
|
|
||||||
} else if (bulletType === 2) {
|
|
||||||
cm.replaceRange('* ', range)
|
|
||||||
} else if (bulletType === 3) {
|
|
||||||
cm.replaceRange('+ ', range)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cm.execCommand('newlineAndIndent')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,7 @@ class MarkdownEditor extends React.Component {
|
|||||||
|
|
||||||
this.escapeFromEditor = ['Control', 'w']
|
this.escapeFromEditor = ['Control', 'w']
|
||||||
|
|
||||||
this.supportMdBold = ['Control', 'b']
|
this.supportMdSelectionBold = ['Control', ':']
|
||||||
|
|
||||||
this.supportMdWordBold = ['Control', ':']
|
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
status: 'PREVIEW',
|
status: 'PREVIEW',
|
||||||
@@ -171,22 +169,15 @@ class MarkdownEditor extends React.Component {
|
|||||||
if (!this.state.isLocked && this.state.status === 'CODE' && this.escapeFromEditor.every(isNoteHandlerKey)) {
|
if (!this.state.isLocked && this.state.status === 'CODE' && this.escapeFromEditor.every(isNoteHandlerKey)) {
|
||||||
document.activeElement.blur()
|
document.activeElement.blur()
|
||||||
}
|
}
|
||||||
if (this.supportMdBold.every(isNoteHandlerKey)) {
|
if (this.supportMdSelectionBold.every(isNoteHandlerKey)) {
|
||||||
this.addMdAndMoveCaretToCenter('****')
|
this.addMdAroundWord('**')
|
||||||
}
|
|
||||||
if (this.supportMdWordBold.every(isNoteHandlerKey)) {
|
|
||||||
this.addMdBetweenWord('**')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addMdAndMoveCaretToCenter (mdElement) {
|
addMdAroundWord (mdElement) {
|
||||||
const currentCaret = this.refs.code.editor.getCursor()
|
if (this.refs.code.editor.getSelection()) {
|
||||||
const cmDoc = this.refs.code.editor.getDoc()
|
return this.addMdAroundSelection(mdElement)
|
||||||
cmDoc.replaceRange(mdElement, currentCaret)
|
}
|
||||||
this.refs.code.editor.setCursor({ line: currentCaret.line, ch: currentCaret.ch + mdElement.length / 2 })
|
|
||||||
}
|
|
||||||
|
|
||||||
addMdBetweenWord (mdElement) {
|
|
||||||
const currentCaret = this.refs.code.editor.getCursor()
|
const currentCaret = this.refs.code.editor.getCursor()
|
||||||
const word = this.refs.code.editor.findWordAt(currentCaret)
|
const word = this.refs.code.editor.findWordAt(currentCaret)
|
||||||
const cmDoc = this.refs.code.editor.getDoc()
|
const cmDoc = this.refs.code.editor.getDoc()
|
||||||
@@ -194,6 +185,10 @@ class MarkdownEditor extends React.Component {
|
|||||||
cmDoc.replaceRange(mdElement, { line: word.head.line, ch: word.head.ch + mdElement.length })
|
cmDoc.replaceRange(mdElement, { line: word.head.line, ch: word.head.ch + mdElement.length })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addMdAroundSelection (mdElement) {
|
||||||
|
this.refs.code.editor.replaceSelection(`${mdElement}${this.refs.code.editor.getSelection()}${mdElement}`)
|
||||||
|
}
|
||||||
|
|
||||||
handleKeyUp (e) {
|
handleKeyUp (e) {
|
||||||
const keyPressed = Object.assign(this.state.keyPressed, {
|
const keyPressed = Object.assign(this.state.keyPressed, {
|
||||||
[e.key]: false
|
[e.key]: false
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ class SnippetTab extends React.Component {
|
|||||||
{!this.state.isRenaming
|
{!this.state.isRenaming
|
||||||
? <button styleName='button'
|
? <button styleName='button'
|
||||||
onClick={(e) => this.handleClick(e)}
|
onClick={(e) => this.handleClick(e)}
|
||||||
|
onDoubleClick={(e) => this.handleRenameClick(e)}
|
||||||
onContextMenu={(e) => this.handleContextMenu(e)}
|
onContextMenu={(e) => this.handleContextMenu(e)}
|
||||||
>
|
>
|
||||||
{snippet.name.trim().length > 0
|
{snippet.name.trim().length > 0
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class InitModal extends React.Component {
|
|||||||
type: 'SNIPPET_NOTE',
|
type: 'SNIPPET_NOTE',
|
||||||
folder: data.storage.folders[0].key,
|
folder: data.storage.folders[0].key,
|
||||||
title: 'Snippet note example',
|
title: 'Snippet note example',
|
||||||
description: 'Snippet note example\nYou can store a series of snippet as a single note like Gist.',
|
description: 'Snippet note example\nYou can store a series of snippets as a single note, like Gist.',
|
||||||
snippets: [
|
snippets: [
|
||||||
{
|
{
|
||||||
name: 'example.html',
|
name: 'example.html',
|
||||||
@@ -214,10 +214,10 @@ class InitModal extends React.Component {
|
|||||||
>Close</button>
|
>Close</button>
|
||||||
<div styleName='body'>
|
<div styleName='body'>
|
||||||
<div styleName='body-welcome'>
|
<div styleName='body-welcome'>
|
||||||
Welcome you!
|
Welcome!
|
||||||
</div>
|
</div>
|
||||||
<div styleName='body-description'>
|
<div styleName='body-description'>
|
||||||
Boostnote will use this directory as a default storage.
|
Please select a directory for Boostnote storage.
|
||||||
</div>
|
</div>
|
||||||
<div styleName='body-path'>
|
<div styleName='body-path'>
|
||||||
<input styleName='body-path-input'
|
<input styleName='body-path-input'
|
||||||
|
|||||||
@@ -104,10 +104,17 @@
|
|||||||
margin-left: 10px
|
margin-left: 10px
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
|
|
||||||
|
.code-mirror
|
||||||
|
width 400px
|
||||||
|
height 140px
|
||||||
|
margin-top 10px
|
||||||
|
margin-bottom 10px
|
||||||
|
|
||||||
colorDarkControl()
|
colorDarkControl()
|
||||||
border-color $ui-dark-borderColor
|
border-color $ui-dark-borderColor
|
||||||
background-color $ui-dark-backgroundColor
|
background-color $ui-dark-backgroundColor
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|
||||||
body[data-theme="dark"]
|
body[data-theme="dark"]
|
||||||
.root
|
.root
|
||||||
color $ui-dark-text-color
|
color $ui-dark-text-color
|
||||||
|
|||||||
@@ -44,17 +44,22 @@ class InfoTab extends React.Component {
|
|||||||
<li>
|
<li>
|
||||||
<a href='https://boostnote.paintory.com/'
|
<a href='https://boostnote.paintory.com/'
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
>Boostnote Shop</a>: Products are shipped to all over the world 🌏
|
>Boostnote Shop</a> : Products are shipped to all over the world 🌏
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href='https://www.patreon.com/boostnote'
|
<a href='https://www.patreon.com/boostnote'
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
>Donation via Patreon</a>: Thank you for your support 🎉
|
>Donate via Patreon</a> : Thank you for your support 🎉
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href='https://github.com/BoostIO/Boostnote/issues'
|
<a href='https://github.com/BoostIO/Boostnote/issues'
|
||||||
onClick={(e) => this.handleLinkClick(e)}
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
>GitHub Issues</a>: We'd love to hear your feedback 🙌
|
>GitHub Issues</a> : We'd love to hear your feedback 🙌
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='https://github.com/BoostIO/Boostnote/blob/master/docs/build.md'
|
||||||
|
onClick={(e) => this.handleLinkClick(e)}
|
||||||
|
>Development</a> : Development configurations for Boostnote 🚀
|
||||||
</li>
|
</li>
|
||||||
<li styleName='cc'>
|
<li styleName='cc'>
|
||||||
Copyright (C) 2017 Maisin&Co.
|
Copyright (C) 2017 Maisin&Co.
|
||||||
|
|||||||
@@ -4,44 +4,66 @@ import styles from './ConfigTab.styl'
|
|||||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||||
import store from 'browser/main/store'
|
import store from 'browser/main/store'
|
||||||
import consts from 'browser/lib/consts'
|
import consts from 'browser/lib/consts'
|
||||||
|
import ReactCodeMirror from 'react-codemirror'
|
||||||
|
import CodeMirror from 'codemirror'
|
||||||
|
|
||||||
const OSX = global.process.platform === 'darwin'
|
const OSX = global.process.platform === 'darwin'
|
||||||
|
|
||||||
class UiTab extends React.Component {
|
class UiTab extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
config: props.config
|
config: props.config,
|
||||||
|
codemirrorTheme: props.config.editor.theme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillMount () {
|
||||||
|
CodeMirror.autoLoadMode(ReactCodeMirror, 'javascript')
|
||||||
|
}
|
||||||
|
|
||||||
handleUIChange (e) {
|
handleUIChange (e) {
|
||||||
let { config } = this.state
|
const { codemirrorTheme } = this.state
|
||||||
|
let checkHighLight = document.getElementById('checkHighLight')
|
||||||
|
|
||||||
config.ui = {
|
if (checkHighLight === null) {
|
||||||
theme: this.refs.uiTheme.value,
|
checkHighLight = document.createElement('link')
|
||||||
disableDirectWrite: this.refs.uiD2w != null
|
checkHighLight.setAttribute('id', 'checkHighLight')
|
||||||
? this.refs.uiD2w.checked
|
checkHighLight.setAttribute('rel', 'stylesheet')
|
||||||
: false
|
document.head.appendChild(checkHighLight)
|
||||||
}
|
|
||||||
config.editor = {
|
|
||||||
theme: this.refs.editorTheme.value,
|
|
||||||
fontSize: this.refs.editorFontSize.value,
|
|
||||||
fontFamily: this.refs.editorFontFamily.value,
|
|
||||||
indentType: this.refs.editorIndentType.value,
|
|
||||||
indentSize: this.refs.editorIndentSize.value,
|
|
||||||
switchPreview: this.refs.editorSwitchPreview.value,
|
|
||||||
keyMap: this.refs.editorKeyMap.value
|
|
||||||
}
|
|
||||||
config.preview = {
|
|
||||||
fontSize: this.refs.previewFontSize.value,
|
|
||||||
fontFamily: this.refs.previewFontFamily.value,
|
|
||||||
codeBlockTheme: this.refs.previewCodeBlockTheme.value,
|
|
||||||
lineNumber: this.refs.previewLineNumber.checked
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({ config })
|
const newConfig = {
|
||||||
|
ui: {
|
||||||
|
theme: this.refs.uiTheme.value,
|
||||||
|
disableDirectWrite: this.refs.uiD2w != null
|
||||||
|
? this.refs.uiD2w.checked
|
||||||
|
: false
|
||||||
|
},
|
||||||
|
editor: {
|
||||||
|
theme: this.refs.editorTheme.value,
|
||||||
|
fontSize: this.refs.editorFontSize.value,
|
||||||
|
fontFamily: this.refs.editorFontFamily.value,
|
||||||
|
indentType: this.refs.editorIndentType.value,
|
||||||
|
indentSize: this.refs.editorIndentSize.value,
|
||||||
|
switchPreview: this.refs.editorSwitchPreview.value,
|
||||||
|
keyMap: this.refs.editorKeyMap.value
|
||||||
|
},
|
||||||
|
preview: {
|
||||||
|
fontSize: this.refs.previewFontSize.value,
|
||||||
|
fontFamily: this.refs.previewFontFamily.value,
|
||||||
|
codeBlockTheme: this.refs.previewCodeBlockTheme.value,
|
||||||
|
lineNumber: this.refs.previewLineNumber.checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const newCodemirrorTheme = this.refs.editorTheme.value
|
||||||
|
|
||||||
|
if (newCodemirrorTheme !== codemirrorTheme) {
|
||||||
|
checkHighLight.setAttribute('href', `../node_modules/codemirror/theme/${newCodemirrorTheme}.css`)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({ config: newConfig, codemirrorTheme: newCodemirrorTheme })
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSaveUIClick (e) {
|
handleSaveUIClick (e) {
|
||||||
@@ -61,8 +83,8 @@ class UiTab extends React.Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const themes = consts.THEMES
|
const themes = consts.THEMES
|
||||||
const { config } = this.state
|
const { config, codemirrorTheme } = this.state
|
||||||
|
const codemirrorSampleCode = 'function iamHappy (happy) {\n\tif (happy) {\n\t console.log("I am Happy!")\n\t} else {\n\t console.log("I am not Happy!")\n\t}\n};'
|
||||||
return (
|
return (
|
||||||
<div styleName='root'>
|
<div styleName='root'>
|
||||||
<div styleName='group'>
|
<div styleName='group'>
|
||||||
@@ -113,6 +135,9 @@ class UiTab extends React.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
|
<div styleName='code-mirror'>
|
||||||
|
<ReactCodeMirror value={codemirrorSampleCode} options={{ lineNumbers: true, readOnly: true, mode: 'javascript', theme: codemirrorTheme }} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='group-section'>
|
<div styleName='group-section'>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# Contributing to Boostnote
|
# Contributing to Boostnote
|
||||||
|
|
||||||
|
## When you open an issue of a bug report
|
||||||
|
There are no issue template. But there is a request.
|
||||||
|
|
||||||
|
**Please paste screenshots of Boostnote with developer tool open**
|
||||||
|
|
||||||
|
Thank you for your help in advance.
|
||||||
|
|
||||||
## About copyright of Pull Request
|
## About copyright of Pull Request
|
||||||
|
|
||||||
If you make a pull request, It means you agree to transfer the copyright of the code changes to MAISIN&CO.
|
If you make a pull request, It means you agree to transfer the copyright of the code changes to MAISIN&CO.
|
||||||
@@ -11,6 +18,13 @@ Because GPL v3 is too strict to be compatible with any other License, We thought
|
|||||||
|
|
||||||
# Contributing to Boostnote(Japanese)
|
# Contributing to Boostnote(Japanese)
|
||||||
|
|
||||||
|
## バグレポートに関してのissueを立てる時
|
||||||
|
イシューテンプレートはありませんが、1つお願いがあります。
|
||||||
|
|
||||||
|
**開発者ツールを開いた状態のBoostnoteのスクリーンショットを貼ってください**
|
||||||
|
|
||||||
|
よろしくお願いします。
|
||||||
|
|
||||||
## Pull requestの著作権について
|
## Pull requestの著作権について
|
||||||
|
|
||||||
Pull requestをすることはその変化分のコードの著作権をMAISIN&CO.に譲渡することに同意することになります。
|
Pull requestをすることはその変化分のコードの著作権をMAISIN&CO.に譲渡することに同意することになります。
|
||||||
|
|||||||
@@ -3,44 +3,44 @@
|
|||||||
## Development
|
## Development
|
||||||
|
|
||||||
We use Webpack HMR to develop Boostnote.
|
We use Webpack HMR to develop Boostnote.
|
||||||
You can use following commands to use default configuration at the top of project directory.
|
Running the following commands, at the top of the project directory, will start Boostnote with the default configurations.
|
||||||
|
|
||||||
Install requirement packages.
|
Install the required packages using yarn.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install
|
$ yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
Build codes and run.
|
Build and run.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run dev-start
|
$ yarn run dev-start
|
||||||
```
|
```
|
||||||
|
|
||||||
This command runs `npm run webpack` and `npm run hot` in parallel. It means it is the same thing to run those commands in 2 terminals.
|
This command runs `yarn run webpack` and `yarn run hot` in parallel. It is the same as running these commands in two terminals.
|
||||||
|
|
||||||
And webpack will watch the code changes and apply it automatically.
|
The `webpack` will watch for code changes and then apply them automatically.
|
||||||
|
|
||||||
If this error: `Failed to load resource: net::ERR_CONNECTION_REFUSED` happens, please reload Boostnote.
|
If the following error occurs: `Failed to load resource: net::ERR_CONNECTION_REFUSED`, please reload Boostnote.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> ### Notice
|
> ### Notice
|
||||||
> There are some cases you have to refresh app yourself.
|
> There are some cases where you have to refresh the app manually.
|
||||||
> 1. When editing constructor method of a component
|
> 1. When editing a constructor method of a component
|
||||||
> 2. When adding a new css class(same to 1: CSS class is re-written by each component. This process occurs at Constructor method.)
|
> 2. When adding a new css class (similar to 1: the CSS class is re-written by each component. This process occurs at the Constructor method.)
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
We use Grunt.
|
We use Grunt to automate deployment.
|
||||||
Acutal deploy can be run by `grunt`. However, you shouldn't use because the default task is including codesign and authenticode.
|
You can build the program by using `grunt`. However, we don't recommend this because the default task includes codesign and authenticode.
|
||||||
|
|
||||||
So, we prepare a script which just make an executable file.
|
So, we've prepared a separate script which just makes an executable file.
|
||||||
|
|
||||||
```
|
```
|
||||||
grunt pre-build
|
grunt pre-build
|
||||||
```
|
```
|
||||||
|
|
||||||
You will find the executable from `dist`. In this case, auto updater won't work because the app isn't signed.
|
You will find the executable in the `dist` directory. Note, the auto updater won't work because the app isn't signed.
|
||||||
|
|
||||||
If you are necessary, you can do codesign or authenticode by this excutable.
|
If you find it necessary, you can use codesign or authenticode with this executable.
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
# How to debug Boostnote (electron app)
|
# How to debug Boostnote (Electron app)
|
||||||
The electron that makes Boostnote is made from Chromium, developers can use `Developer Tools` as same as Google Chrome.
|
Boostnote is an Electron app so it's based on Chromium; developers can use `Developer Tools` just like Google Chrome.
|
||||||
|
|
||||||
This is how to toggle Developer Tools:
|
You can toggle the `Developer Tools` like this:
|
||||||

|

|
||||||
|
|
||||||
The Developer Tools is like this:
|
The `Developer Tools` will look like this:
|
||||||

|

|
||||||
|
|
||||||
When errors occur, the error messages are displayed at the `console`.
|
When errors occur, the error messages are displayed at the `console`.
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
For example, there is a way to put `debugger` as a breakpoint into the code like this:
|
For example, you can use the `debugger` to set a breakpoint in the code like this:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
But this is only an example. You need to find a way to debug which fits with you.
|
This is just an illustrative example, you should find a way to debug which fits your style.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
* [Official document of Google Chrome about debugging](https://developer.chrome.com/devtools)
|
* [Official document of Google Chrome about debugging](https://developer.chrome.com/devtools)
|
||||||
|
|||||||
@@ -8,16 +8,16 @@ Webpack HRMを使います。
|
|||||||
依存するパッケージをインストールします。
|
依存するパッケージをインストールします。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install
|
$ yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
ビルドして実行します。
|
ビルドして実行します。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run dev-start
|
$ yarn run dev-start
|
||||||
```
|
```
|
||||||
|
|
||||||
このコマンドは `npm run webpack` と `npm run hot`を並列に実行します。つまりこのコマンドは2つのターミナルで同時にこれらのコマンドを実行するのと同じことです。
|
このコマンドは `yarn run webpack` と `yarn run hot`を並列に実行します。つまりこのコマンドは2つのターミナルで同時にこれらのコマンドを実行するのと同じことです。
|
||||||
|
|
||||||
そして、Webpackが自動的にコードの変更を確認し、それを適用してくれるようになります。
|
そして、Webpackが自動的にコードの変更を確認し、それを適用してくれるようになります。
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Webpack HRM을 개발을 위해 사용합니다.
|
|||||||
다음 명령을 통해 저희가 해둔 설정을 사용 할 수 있습니다.
|
다음 명령을 통해 저희가 해둔 설정을 사용 할 수 있습니다.
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run webpack
|
yarn run webpack
|
||||||
```
|
```
|
||||||
|
|
||||||
몇 초 후, 다음 메세지를 보게 될겁니다.
|
몇 초 후, 다음 메세지를 보게 될겁니다.
|
||||||
@@ -18,10 +18,10 @@ webpack: bundle is now VALID.
|
|||||||
그럼 앱을 실행합시다.
|
그럼 앱을 실행합시다.
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run hot
|
yarn run hot
|
||||||
```
|
```
|
||||||
|
|
||||||
> 원래 앱은 `npm start`로 실행가능합니다. 하지만 이 경우, 컴파일된 스크립트를 사용할 것입니다.
|
> 원래 앱은 `yarn start`로 실행가능합니다. 하지만 이 경우, 컴파일된 스크립트를 사용할 것입니다.
|
||||||
|
|
||||||
이로써 웹팩이 자동적으로 코드변경을 확인하고 적용해줄 것입니다.
|
이로써 웹팩이 자동적으로 코드변경을 확인하고 적용해줄 것입니다.
|
||||||
|
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
const electron = require('electron')
|
|
||||||
const BrowserWindow = electron.BrowserWindow
|
|
||||||
|
|
||||||
const OSX = process.platform === 'darwin'
|
|
||||||
// const WIN = process.platform === 'win32'
|
|
||||||
|
|
||||||
var edit = {
|
|
||||||
label: 'Edit',
|
|
||||||
submenu: [
|
|
||||||
{
|
|
||||||
label: 'Undo',
|
|
||||||
accelerator: 'Command+Z',
|
|
||||||
selector: 'undo:'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Redo',
|
|
||||||
accelerator: 'Shift+Command+Z',
|
|
||||||
selector: 'redo:'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separator'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Cut',
|
|
||||||
accelerator: 'Command+X',
|
|
||||||
selector: 'cut:'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Copy',
|
|
||||||
accelerator: 'Command+C',
|
|
||||||
selector: 'copy:'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Paste',
|
|
||||||
accelerator: 'Command+V',
|
|
||||||
selector: 'paste:'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Select All',
|
|
||||||
accelerator: 'Command+A',
|
|
||||||
selector: 'selectAll:'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
var view = {
|
|
||||||
label: 'View',
|
|
||||||
submenu: [
|
|
||||||
{
|
|
||||||
label: 'Focus Search',
|
|
||||||
accelerator: 'Control + Alt + F',
|
|
||||||
click: function () {
|
|
||||||
console.log('focus find')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separator'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Toggle Markdown Preview',
|
|
||||||
accelerator: OSX ? 'Command + P' : 'Ctrl + P',
|
|
||||||
click: function () {
|
|
||||||
console.log('markdown')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separator'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Reload',
|
|
||||||
accelerator: (function () {
|
|
||||||
if (process.platform === 'darwin') return 'Command+R'
|
|
||||||
else return 'Ctrl+R'
|
|
||||||
})(),
|
|
||||||
click: function () {
|
|
||||||
BrowserWindow.getFocusedWindow().reload()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = process.platform === 'darwin'
|
|
||||||
? [edit, view]
|
|
||||||
: [view]
|
|
||||||
@@ -54,14 +54,14 @@ var file = {
|
|||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'New Note',
|
label: 'New Note',
|
||||||
accelerator: 'CmdOrCtrl + N',
|
accelerator: 'CommandOrControl+N',
|
||||||
click: function () {
|
click: function () {
|
||||||
mainWindow.webContents.send('top:new-note')
|
mainWindow.webContents.send('top:new-note')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Focus Note',
|
label: 'Focus Note',
|
||||||
accelerator: 'Control + E',
|
accelerator: 'Control+E',
|
||||||
click () {
|
click () {
|
||||||
mainWindow.webContents.send('detail:focus')
|
mainWindow.webContents.send('detail:focus')
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ var file = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Delete Note',
|
label: 'Delete Note',
|
||||||
accelerator: OSX ? 'Control + Backspace' : 'Control + Delete',
|
accelerator: OSX ? 'Control+Backspace' : 'Control+Delete',
|
||||||
click: function () {
|
click: function () {
|
||||||
mainWindow.webContents.send('detail:delete')
|
mainWindow.webContents.send('detail:delete')
|
||||||
}
|
}
|
||||||
@@ -154,14 +154,14 @@ var view = {
|
|||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'Reload',
|
label: 'Reload',
|
||||||
accelerator: 'CmdOrCtrl+R',
|
accelerator: 'CommandOrControl+R',
|
||||||
click: function () {
|
click: function () {
|
||||||
BrowserWindow.getFocusedWindow().reload()
|
BrowserWindow.getFocusedWindow().reload()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Toggle Developer Tools',
|
label: 'Toggle Developer Tools',
|
||||||
accelerator: OSX ? 'Command+Alt+I' : 'Ctrl+Shift+I',
|
accelerator: OSX ? 'Command+Alt+I' : 'Control+Shift+I',
|
||||||
click: function () {
|
click: function () {
|
||||||
BrowserWindow.getFocusedWindow().toggleDevTools()
|
BrowserWindow.getFocusedWindow().toggleDevTools()
|
||||||
}
|
}
|
||||||
@@ -171,21 +171,21 @@ var view = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Next Note',
|
label: 'Next Note',
|
||||||
accelerator: 'Control + J',
|
accelerator: 'Control+J',
|
||||||
click () {
|
click () {
|
||||||
mainWindow.webContents.send('list:next')
|
mainWindow.webContents.send('list:next')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Previous Note',
|
label: 'Previous Note',
|
||||||
accelerator: 'Control + U',
|
accelerator: 'Control+U',
|
||||||
click () {
|
click () {
|
||||||
mainWindow.webContents.send('list:prior')
|
mainWindow.webContents.send('list:prior')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Jump to Top',
|
label: 'Jump to Top',
|
||||||
accelerator: 'Control + G',
|
accelerator: 'Control+G',
|
||||||
click () {
|
click () {
|
||||||
mainWindow.webContents.send('list:jumpToTop')
|
mainWindow.webContents.send('list:jumpToTop')
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ var view = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Focus Search',
|
label: 'Focus Search',
|
||||||
accelerator: 'Control + S',
|
accelerator: 'Control+S',
|
||||||
click () {
|
click () {
|
||||||
mainWindow.webContents.send('top:focus-search')
|
mainWindow.webContents.send('top:focus-search')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,12 +40,19 @@ mainWindow.webContents.sendInputEvent({
|
|||||||
|
|
||||||
if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon') {
|
if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon') {
|
||||||
mainWindow.on('close', function (e) {
|
mainWindow.on('close', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
mainWindow.minimize()
|
mainWindow.minimize()
|
||||||
} else {
|
} else {
|
||||||
mainWindow.hide()
|
if (mainWindow.isFullScreen()) {
|
||||||
|
mainWindow.once('leave-full-screen', function () {
|
||||||
|
mainWindow.hide()
|
||||||
|
})
|
||||||
|
mainWindow.setFullScreen(false)
|
||||||
|
} else {
|
||||||
|
mainWindow.hide()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
e.preventDefault()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('before-quit', function (e) {
|
app.on('before-quit', function (e) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
"font-awesome": "^4.3.0",
|
"font-awesome": "^4.3.0",
|
||||||
"immutable": "^3.8.1",
|
"immutable": "^3.8.1",
|
||||||
"js-sequence-diagrams": "^1000000.0.6",
|
"js-sequence-diagrams": "^1000000.0.6",
|
||||||
"katex": "^0.6.0",
|
"katex": "^0.7.1",
|
||||||
"lodash": "^4.11.1",
|
"lodash": "^4.11.1",
|
||||||
"markdown-it": "^6.0.1",
|
"markdown-it": "^6.0.1",
|
||||||
"markdown-it-checkbox": "^1.1.0",
|
"markdown-it-checkbox": "^1.1.0",
|
||||||
@@ -68,6 +68,7 @@
|
|||||||
"node-ipc": "^8.1.0",
|
"node-ipc": "^8.1.0",
|
||||||
"raphael": "^2.2.7",
|
"raphael": "^2.2.7",
|
||||||
"react": "^15.0.2",
|
"react": "^15.0.2",
|
||||||
|
"react-codemirror": "^0.3.0",
|
||||||
"react-dom": "^15.0.2",
|
"react-dom": "^15.0.2",
|
||||||
"react-redux": "^4.4.5",
|
"react-redux": "^4.4.5",
|
||||||
"redux": "^3.5.2",
|
"redux": "^3.5.2",
|
||||||
@@ -101,10 +102,8 @@
|
|||||||
"jsdom": "^9.4.2",
|
"jsdom": "^9.4.2",
|
||||||
"merge-stream": "^1.0.0",
|
"merge-stream": "^1.0.0",
|
||||||
"nib": "^1.1.0",
|
"nib": "^1.1.0",
|
||||||
"react": "^15.3.0",
|
|
||||||
"react-color": "^2.2.2",
|
"react-color": "^2.2.2",
|
||||||
"react-css-modules": "^3.7.6",
|
"react-css-modules": "^3.7.6",
|
||||||
"react-dom": "^15.3.0",
|
|
||||||
"react-input-autosize": "^1.1.0",
|
"react-input-autosize": "^1.1.0",
|
||||||
"react-router": "^2.4.0",
|
"react-router": "^2.4.0",
|
||||||
"react-router-redux": "^4.0.4",
|
"react-router-redux": "^4.0.4",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
## slack group
|
## slack group
|
||||||
私たちにはslack groupもあります!世界中のプログラマー達と、Boostnoteについてディスカッションをしましょう! <br>
|
私たちにはslack groupもあります!世界中のプログラマー達と、Boostnoteについてディスカッションをしましょう! <br>
|
||||||
[こちらから](https://boostnote-group.slack.com/shared_invite/MTU5OTMwNjMyNjQxLTE0OTA2NzkyNzktYzkzYmZhYjk0Nw)
|
[こちらから](https://boostnote-group.slack.com/shared_invite/MTcxMjIwODk5Mzk3LTE0OTI1NjQxNDUtMTkwZTBjOWFkMg)
|
||||||
|
|
||||||
## More Information
|
## More Information
|
||||||
* Website: http://boostnote.io/
|
* Website: http://boostnote.io/
|
||||||
|
|||||||
18
readme.md
18
readme.md
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
[](https://travis-ci.org/BoostIO/Boostnote)
|
[](https://travis-ci.org/BoostIO/Boostnote)
|
||||||
|
|
||||||
## Author & Maintainer
|
## Authors & Maintainers
|
||||||
- [Rokt33r](https://github.com/rokt33r)
|
- [Rokt33r](https://github.com/rokt33r)
|
||||||
- [sota1235](https://github.com/sota1235)
|
- [sota1235](https://github.com/sota1235)
|
||||||
- [Kohei TAKATA](https://github.com/kohei-takata)
|
- [Kohei TAKATA](https://github.com/kohei-takata)
|
||||||
@@ -23,16 +23,16 @@
|
|||||||
## Contributors
|
## Contributors
|
||||||
[Great contributors](https://github.com/BoostIO/Boostnote/graphs/contributors) :tada:
|
[Great contributors](https://github.com/BoostIO/Boostnote/graphs/contributors) :tada:
|
||||||
|
|
||||||
## slack group
|
## Slack Group
|
||||||
Let's talk about Boostnote's feature, request, Japanese gourmet and things like that🍣 <br>
|
Let's talk about Boostnote's great features, new feature requests and things like Japanese gourmet. 🍣 <br>
|
||||||
[Join us](https://boostnote-group.slack.com/shared_invite/MTU5OTMwNjMyNjQxLTE0OTA2NzkyNzktYzkzYmZhYjk0Nw)
|
[Join us](https://boostnote-group.slack.com/shared_invite/MTcxMjIwODk5Mzk3LTE0OTI1NjQxNDUtMTkwZTBjOWFkMg)
|
||||||
|
|
||||||
## More Information
|
## More Information
|
||||||
* Website: http://boostnote.io/
|
* [Website](https://boostnote.io)
|
||||||
* Roadmap(upcoming features and bug fixes): https://github.com/BoostIO/Boostnote/wiki/List-of-the-requested-features
|
* [Boostnote Shop](https://boostnote.paintory.com/) : Products are shipped to all over the world 🌏
|
||||||
* Boostnote Shop(Products are shipped to all over the world :+1:): https://boostnote.paintory.com/
|
* [Donate via Patreon](https://www.patreon.com/boostnote) : Thank you for your support 🎉
|
||||||
* Donation: [Patreon](https://www.patreon.com/boostnote)
|
* [GitHub Issues](https://github.com/BoostIO/Boostnote/issues) : We'd love to hear your feedback 🙌
|
||||||
* Development: https://github.com/BoostIO/Boostnote/blob/master/docs/build.md
|
* [Development](https://github.com/BoostIO/Boostnote/blob/master/docs/build.md) : Development configurations for Boostnote 🚀
|
||||||
* Copyright (C) 2017 Maisin&Co.
|
* Copyright (C) 2017 Maisin&Co.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
Reference in New Issue
Block a user