Compare commits

...

10 Commits

Author SHA1 Message Date
Damillora f341799f6b Update ver 2020-03-03 09:55:35 +07:00
Damillora 41339b4f10 CSS library 2020-03-03 09:54:54 +07:00
Damillora 2873710440 Correct stuff for 0.3 2020-01-14 20:56:55 +07:00
Damillora 13505d3a6d Add linter 2020-01-11 02:11:04 +07:00
Damillora 6a943e8274 Add Documentation for Header and Navigation components 2020-01-06 02:59:09 +07:00
Damillora 6cd878e3af npmignore 2020-01-06 02:50:22 +07:00
Damillora 8e49f2b942 Make a proper library 2020-01-06 02:47:20 +07:00
Damillora c476560fd2 v0.1.1 2020-01-06 01:51:09 +07:00
Damillora cfadfcd1b0 Add LICENSE 2020-01-06 01:50:14 +07:00
Damillora 5104df723c Use default VuePress theme 2020-01-06 01:46:32 +07:00
27 changed files with 1295 additions and 7472 deletions

20
.npmignore Normal file
View File

@ -0,0 +1,20 @@
.DS_Store
node_modules
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -1,31 +1,13 @@
# Yuika
> A unified design system and Vue component library for developing applications based on
> the design system
> A unified design system and CSS library for developing applications based on it.
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn run serve
```
### Compiles and minifies for production
### Compiles
```
yarn run build
```
### Run your tests
```
yarn run test
```
### Lints and fixes files
```
yarn run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View File

@ -1,33 +0,0 @@
const autoprefixer = require('autoprefixer');
const tailwindcss = require('tailwindcss');
const postcssPurgecss = require(`@fullhuman/postcss-purgecss`);
const purgecss = postcssPurgecss({
// Specify the paths to all of the template files in your project.
content: [
'./public/**/*.html',
'./src/**/*.vue',
],
// Include any special characters you're using in this regular expression.
// See: https://tailwindcss.com/docs/controlling-file-size/#understanding-the-regex
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
// Whitelist auto generated classes for transitions and router links.
// From: https://github.com/ky-is/vue-cli-plugin-tailwind
whitelistPatterns: [/-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/],
});
module.exports = {
title: "Yuika documentation",
description: "",
themeConfig: {
},
postcss: {
plugins: [
require("autoprefixer"),
require("tailwindcss")("./tailwind.config.js"),
...process.env.NODE_ENV === 'production'
? [purgecss]
: [],
]
}
};

View File

@ -1,43 +0,0 @@
<template>
<div>
<Header>
<HeaderLeft>
</HeaderLeft>
<HeaderMiddle>
<p>Yuika Documentation</p>
</HeaderMiddle>
<HeaderRight>
<NavigationBar>
<NavigationItem>
<a href="/">Home</a>
</NavigationItem>
<NavigationItem>
<a href="/">Home</a>
</NavigationItem>
</NavigationBar>
</HeaderRight>
</Header>
<div>
<Content/>
</div>
</div>
</template>
<script>
import { Header, HeaderLeft, HeaderMiddle, HeaderRight } from "../../../src/components/Header";
import { NavigationBar, NavigationItem } from "../../../src/components/Navigation";
export default {
components: {
Header, HeaderLeft, HeaderMiddle, HeaderRight,
NavigationBar, NavigationItem,
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css?family=Exo+2:300,400,500&display=swap');
@import "./../../../src/assets/css/tailwind.css";
body {
@apply m-0 font-sans;
}
</style>

View File

@ -1 +0,0 @@
# Yuika

62
gulpfile.js Normal file
View File

@ -0,0 +1,62 @@
const {series, watch, src, dest, parallel} = require('gulp');
const postcss = require('gulp-postcss')
const livereload = require('gulp-livereload');
const zip = require('gulp-zip');
const concat = require('gulp-concat');
const uglify = require('gulp-uglify');
const cleancss = require('gulp-clean-css');
const purgecss = require('@fullhuman/postcss-purgecss')({
// Specify the paths to all of the template files in your project
content: [
'./**/*.html',
'./src/css/**/*.css', // This file defines required styles for the Ghost editor
// etc.
],
// Include any special characters you're using in this regular expression
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
})
function serve(done) {
livereload.listen();
done();
}
function html() {
return src(['./**/*.html'])
.pipe(livereload());
}
function css () {
return src('src/css/yuika.css')
// ...
.pipe(concat('yuika.css'))
.pipe(postcss([
// ...
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
...process.env.NODE_ENV === 'production' ? [purgecss] : []
// ...
]))
// ...
.pipe(cleancss({compatibility: 'ie8'}))
.pipe(dest('dist/'))
.pipe(livereload())
}
const cssWatcher = () => watch('src/css/**', css);
const htmlWatcher = () => watch(['./**/*.html'], html);
const watcher = parallel(cssWatcher, htmlWatcher);
const build = css;
const dev = series(build, serve, watcher);
exports.build = build;
exports.dev = dev;
exports.default = build;

View File

@ -1,48 +1,29 @@
{
"name": "@mitsuminedamillora/yuika",
"version": "0.1.0",
"main": "./dist/yuika.common.js",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build-lib": "vue-cli-service build --target lib --name yuika src/main.js",
"lint": "vue-cli-service lint",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"dependencies": {
"@fullhuman/postcss-purgecss": "^1.3.0",
"core-js": "^3.4.4",
"tailwindcss": "^1.1.4",
"tailwindcss-transitions": "^2.1.0",
"vue": "^2.6.10"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10",
"vuepress": "^1.2.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
"name": "@mitsuminedamillora/yuika",
"description": "A unified design system and a CSS components library for developing applications based on it",
"version": "0.4.1",
"license": "MIT",
"author": {
"email": "developer@damillora.com"
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
"scripts": {
"build": "gulp build"
},
"dependencies": {
"gulp": "^4.0.2",
"gulp-clean-css": "^4.2.0",
"gulp-concat": "^2.6.1",
"gulp-livereload": "^4.0.2",
"gulp-postcss": "^8.0.0",
"gulp-uglify": "^3.0.2",
"gulp-zip": "^5.0.1",
"postcss-font-awesome": "^0.4.0",
"postcss-import": "^12.0.1",
"tailwindcss": "^1.1.3",
"tailwindcss-transitions": "^2.1.0",
"typeface-exo-2": "^0.0.72"
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^1.3.0"
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

View File

@ -1,27 +0,0 @@
const autoprefixer = require('autoprefixer');
const tailwindcss = require('tailwindcss');
const postcssPurgecss = require(`@fullhuman/postcss-purgecss`);
const purgecss = postcssPurgecss({
// Specify the paths to all of the template files in your project.
content: [
'./public/**/*.html',
'./src/**/*.vue',
],
// Include any special characters you're using in this regular expression.
// See: https://tailwindcss.com/docs/controlling-file-size/#understanding-the-regex
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
// Whitelist auto generated classes for transitions and router links.
// From: https://github.com/ky-is/vue-cli-plugin-tailwind
whitelistPatterns: [/-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/],
});
module.exports = {
plugins: [
tailwindcss,
autoprefixer,
...process.env.NODE_ENV === 'production'
? [purgecss]
: [],
],
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>yuika</title>
</head>
<body>
<noscript>
<strong>We're sorry but yuika doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@ -1,13 +0,0 @@
<template>
<div>
</div>
</template>
<script>
export default {
name: 'app',
}
</script>
<style>
</style>

View File

@ -1,3 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -1,18 +0,0 @@
<template>
<header class="yuika-header">
<slot></slot>
</header>
</template>
<script>
export default {
}
</script>
<style>
.yuika-header {
@apply h-16 w-full z-10 flex flex-row justify-start items-center bg-yuika-blue-500 text-white;
}
</style>

View File

@ -1,17 +0,0 @@
<template>
<div class="yuika-header-left">
<slot></slot>
</div>
</template>
<script>
export default {
}
</script>
<style>
.yuika-header-left {
@apply ml-4;
}
</style>

View File

@ -1,17 +0,0 @@
<template>
<div class="yuika-header-middle">
<slot></slot>
</div>
</template>
<script>
export default {
}
</script>
<style>
.yuika-header-middle {
@apply flex-grow;
}
</style>

View File

@ -1,17 +0,0 @@
<template>
<div class="yuika-header-right">
<slot></slot>
</div>
</template>
<script>
export default {
}
</script>
<style>
.yuika-header-right {
@apply mr-4;
}
</style>

View File

@ -1,11 +0,0 @@
import Header from "./Header";
import HeaderLeft from "./HeaderLeft";
import HeaderMiddle from "./HeaderMiddle";
import HeaderRight from "./HeaderRight";
export {
Header,
HeaderLeft,
HeaderMiddle,
HeaderRight
}

View File

@ -1,20 +0,0 @@
<template>
<ul class="yuika-nav-bar">
<slot></slot>
</ul>
</template>
<script>
export default {
}
</script>
<style>
.yuika-nav-bar {
@apply w-full flex flex-row;
}
.yuika-nav-bar .yuika-nav-item a {
@apply text-white no-underline;
}
</style>

View File

@ -1,17 +0,0 @@
<template>
<li class="yuika-nav-item">
<slot></slot>
</li>
</template>
<script>
export default {
}
</script>
<style>
.yuika-nav-item {
@apply mx-2 list-none;
}
</style>

View File

@ -1,7 +0,0 @@
import NavigationBar from "./NavigationBar";
import NavigationItem from "./NavigationItem";
export {
NavigationBar,
NavigationItem,
}

View File

@ -0,0 +1,16 @@
.yuika-header {
@apply h-16 w-full z-10 flex flex-row justify-start items-center bg-yuika-blue-500 text-white;
}
.yuika-header-left {
@apply ml-4;
}
.yuika-header-middle {
@apply flex-grow;
}
.yuika-header-right {
@apply mr-4;
}

View File

@ -0,0 +1,11 @@
.yuika-nav-bar {
@apply w-full flex flex-row;
}
.yuika-nav-bar .yuika-nav-item {
@apply mx-2 list-none;
}
.yuika-nav-bar .yuika-nav-item a {
@apply text-white no-underline;
}

4
src/css/yuika.css Normal file
View File

@ -0,0 +1,4 @@
/* Components */
@import 'components/header.css';
@import 'components/navigation-bar.css';

View File

@ -1,9 +0,0 @@
import Vue from 'vue'
import App from './App.vue'
import '@/assets/css/tailwind.css';
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')

8286
yarn.lock

File diff suppressed because it is too large Load Diff