Skip to content

Commit 6c9bf88

Browse files
committed
init
1 parent 815297e commit 6c9bf88

File tree

125 files changed

+11667
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+11667
-0
lines changed

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCovernpm
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
.nyc_coverage
16+
.nyc_output
17+
18+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19+
.grunt
20+
21+
# Compiled binary addons (http://nodejs.org/api/addons.html)
22+
build/Release
23+
24+
# Dependency directory
25+
node_modules
26+
npm-debug.log
27+
28+
# Users Environment Variables
29+
.lock-wscript
30+
31+
# Webstorm
32+
.idea/
33+
34+
*.DS_Store
35+
36+
# the archived version of the project for Gemfuy
37+
*.tgz
38+
39+
# dotenv environment variables file
40+
.env
41+
.package-lock.json
42+
43+
**/public/**
44+
45+
.DS_Store

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"cSpell.words": [
3+
"codeexpander",
4+
"oncework",
5+
"reco",
6+
"vuepress",
7+
"vuetify"
8+
]
9+
}

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# CodeExpander
2+
3+
`CodeExpander` is a cross-platform cloud synchronization development tool for developers that includes input enhancement(`Text expander`), `code snippet management`. It saves and manages text or script snippets that require repeated input and can be expanded automatically by setting abbreviations.
4+
5+
All snippets can be synchronized to the clip management of `Localization`,` Github`, `码云` platform, with unlimited public / private clips, grouping, cloud synchronization, online editing, and sharing with others.
6+
7+
![](./uploaded/map-main-01.png)
8+
9+
![](./uploaded/map-main-03.png)
10+
11+
![](./uploaded/map-main-02.png)
12+
13+
## **Document**
14+
15+
[Getting Started](https://codeexpander.com/en/views/introduce/basic-usage.html)
16+
17+
## **Download**
18+
19+
MacOS 10.14/10.13/10.12/10.11 \(Mojave, High Sierra, Sierra...\) **Or** Windows 7/8/10
20+
21+
[Click to Download](https://github.com/oncework/codeexpander/releases)
22+
23+
## **Pricing**
24+
25+
Most features are free and buy now for \$4.99 if you want to support the author
26+
27+
- [爱发卡](https://w.url.cn/s/AHRprNl)
28+
- [Paddle](https://pay.paddle.com/checkout/540339)
29+
30+
Please contact me if you have any questions
31+
32+
![](./uploaded/weixin-profile.jpg)
33+
34+
## Features
35+
36+
### Smarter typing
37+
38+
Avoid typing the same sentence repeatedly, refusing to paste and copy starts with me. [How to create>>](https://codeexpander.com/en/views/advance/text-and-script.html)
39+
40+
> How it works: Detect keywords you enter (pre-set instructions) and replace them as you type.
41+
42+
![](./uploaded/custom-snippet.gif)
43+
44+
### Custom scripts
45+
46+
Quickly run the script to get the processed results, and you can achieve any function you want.[How to create>>](https://codeexpander.com/en/views/advance/text-and-script.html)
47+
48+
![](./uploaded/gene-md.gif)
49+
50+
### Create template
51+
52+
Support custom date, simulate keyboard macro, generate rich text template.[How to create>>](https://codeexpander.com/en/views/advance/fill-in.html)
53+
54+
![](./uploaded/fill-in.gif)
55+
56+
### Create snippets
57+
58+
Quickly save existing code snippets and sync to another computer.
59+
60+
![](./uploaded/gene-snippet.gif)
61+
62+
### Generate code picture
63+
64+
Easier to share your own style clips to others.
65+
66+
![](./uploaded/gene-pic.gif)
67+
68+
### Search bar
69+
70+
No memory required, fuzzy full text search results.[How to use>>](https://codeexpander.com/en/views/introduce/quick-browse.html)
71+
72+
![](./uploaded/search-bar.gif)
73+
74+
All clips can be synchronized to the clip management of `Localization`,` Github`, `Code Cloud` platform, with unlimited public / private clips, grouping, cloud synchronization, online editing, and sharing with others.
75+
## **Support**
76+
77+
[Product hunt support](https://www.producthunt.com/posts/oncework?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-oncework)
78+
79+
![](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=135763&theme=light)

deploy.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env sh
2+
3+
# 确保脚本抛出遇到的错误
4+
set -e
5+
6+
# 生成静态文件
7+
npm run build
8+
9+
# 进入生成的文件夹
10+
cd public
11+
12+
# 如果是发布到自定义域名
13+
echo 'codeexpander.com' > CNAME
14+
echo 'once.work' >> CNAME
15+
16+
git init
17+
git remote add coding https://e.coding.net/xudaolong/codeexpander.git
18+
git checkout -b gh-pages-source
19+
git add -A
20+
git commit -m 'deploy'
21+
git push coding gh-pages-source -f
22+
git remote add github https://github.com/oncework/codeexpander.git
23+
git checkout -b master
24+
git push github master -f
25+
26+
cd -
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<template>
2+
<div class="contributors-wrapper">
3+
<h3 class="contributors-title" v-if="showTitle">
4+
{{ repo }}
5+
<GitHubLink :repo="`${user}/${repo}`"/>
6+
</h3>
7+
<ul class="contributors-list">
8+
<li class="contributors-item" v-for="(contributor, index) in contributors" :key="index">
9+
<a :href="contributor.html_url">
10+
<img class="avatar" :src="contributor.avatar_url" :alt="contributor.login">
11+
<a class="name">{{ contributor.login }}</a>
12+
</a>
13+
</li>
14+
</ul>
15+
</div>
16+
</template>
17+
18+
<script>
19+
export default {
20+
props: {
21+
showTitle: {
22+
type: Boolean,
23+
default: false
24+
},
25+
user: {
26+
type: String,
27+
require: true
28+
},
29+
repo: {
30+
type: String,
31+
require: true
32+
}
33+
},
34+
data () {
35+
return {
36+
contributors: []
37+
}
38+
},
39+
mounted () {
40+
this.getContributors()
41+
},
42+
methods: {
43+
getContributors () {
44+
require('whatwg-fetch')
45+
const { user, repo } = this
46+
const uri = `https://api.github.com/repos/${user}/${repo}/contributors`
47+
48+
fetch(uri)
49+
.then(function(response) {
50+
return response.json()
51+
})
52+
.then(res => {
53+
this.contributors = res
54+
})
55+
}
56+
}
57+
}
58+
</script>
59+
60+
<style lang="stylus" scoped>
61+
.contributors-wrapper
62+
box-sizing border-box
63+
margin 0 auto
64+
max-width 46rem
65+
width 100%
66+
text-align cent
67+
.contributors-title
68+
margin-top 20px
69+
.contributors-list
70+
list-style none
71+
display flex
72+
flex-wrap wrap
73+
padding-left 0
74+
width 100%
75+
margin 30px 0
76+
.contributors-item
77+
flex 0 0 80px
78+
margin-bottom 10px
79+
text-align center
80+
> a
81+
display inline-block
82+
width 100%
83+
.avatar
84+
display inline-block
85+
width 36px
86+
height 36px
87+
border-radius 6px
88+
border 2px solid rgba(62, 175, 124, .3)
89+
img
90+
width 100%
91+
height 100%
92+
.name
93+
margin 0 auto
94+
width 90%
95+
display block
96+
overflow: hidden;
97+
text-overflow:ellipsis;
98+
white-space: nowrap;
99+
font-size 12px
100+
</style>

docs/.vuepress/components/Gist.vue

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<template>
2+
<div>
3+
<app-gist-core :gist-div="gistData" />
4+
</div>
5+
</template>
6+
7+
<script>
8+
var gistUrl = "https://gist.github.com/";
9+
var data = {};
10+
import GistCore from "./GistCore.vue";
11+
12+
export default {
13+
components: {
14+
appGistCore: GistCore
15+
},
16+
props: {
17+
id: {
18+
type: String,
19+
required: true
20+
},
21+
file: {
22+
type: String,
23+
required: false,
24+
default: ""
25+
}
26+
},
27+
data() {
28+
return {
29+
gistData: "loading..."
30+
};
31+
},
32+
mounted() {
33+
this.getGistData(this.id);
34+
},
35+
methods: {
36+
getGistData(gistId) {
37+
var self = this;
38+
if (this.file.length > 0) {
39+
data.file = this.file;
40+
}
41+
window.$.ajax({
42+
url: gistUrl + gistId + ".json",
43+
data: data,
44+
dataType: "jsonp",
45+
timeout: 20000,
46+
success: function(response) {
47+
self.gistData = response.div;
48+
},
49+
error: function(response) {
50+
console.log("error");
51+
}
52+
});
53+
}
54+
}
55+
};
56+
</script>
57+
58+
<style scoped>
59+
@import url("https://github.githubassets.com/assets/gist-embed-4ac6018bcc05457cde2f66d2e7299d11.css");
60+
</style>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<div>
3+
<p v-html="gistDiv" />
4+
</div>
5+
</template>
6+
<script>
7+
export default {
8+
props: {
9+
gistDiv: {
10+
type: String,
11+
required: true
12+
}
13+
}
14+
};
15+
</script>
16+
<style scoped>
17+
@import url("https://github.githubassets.com/assets/gist-embed-4ac6018bcc05457cde2f66d2e7299d11.css");
18+
</style>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// based on
2+
// https://github.com/vuepress/vuepress-community/blob/master/packages/docs/src/.vuepress/components/GitHubLink.vue
3+
4+
<template>
5+
<a
6+
class="github-link"
7+
rel="noopener noreferrer"
8+
target="_blank"
9+
:title="repo"
10+
:href="`https://github.com/${repo}`"
11+
>
12+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28">
13+
<path
14+
d="M14 0C6.27 0 0 6.43 0 14.36c0 6.34 4.01 11.72 9.57 13.62.7.13.96-.31.96-.69 0-.34-.01-1.24-.02-2.44-3.89.87-4.72-1.92-4.72-1.92-.64-1.66-1.55-2.1-1.55-2.1-1.27-.89.1-.87.1-.87 1.4.1 2.14 1.48 2.14 1.48 1.25 2.19 3.28 1.56 4.07 1.19.13-.93.49-1.56.89-1.92-3.11-.36-6.38-1.59-6.38-7.09 0-1.57.55-2.85 1.44-3.85-.14-.36-.62-1.82.14-3.8 0 0 1.18-.39 3.85 1.47a12.8 12.8 0 0 1 3.5-.48c1.19.01 2.39.16 3.5.48 2.67-1.86 3.85-1.47 3.85-1.47.76 1.98.28 3.44.14 3.8.9 1 1.44 2.28 1.44 3.85 0 5.51-3.27 6.73-6.39 7.08.5.44.95 1.32.95 2.66 0 1.92-.02 3.47-.02 3.94 0 .38.25.83.96.69C23.99 26.07 28 20.7 28 14.36 28 6.43 21.73 0 14 0z"
15+
fill-rule="evenodd"
16+
clip-rule="evenodd"
17+
/>
18+
</svg>
19+
</a>
20+
</template>
21+
22+
<script>
23+
export default {
24+
name: 'GitHubLink',
25+
props: {
26+
repo: {
27+
type: String,
28+
required: true,
29+
},
30+
},
31+
}
32+
</script>
33+
34+
<style lang="stylus">
35+
.github-link
36+
width 1em
37+
height 1em
38+
text-decoration none
39+
display inline-block
40+
vertical-align -.1em
41+
margin-left 0.6rem
42+
path
43+
fill #666
44+
transition 0.3s ease
45+
&:hover
46+
path
47+
fill #888
48+
</style>

0 commit comments

Comments
 (0)