diff --git a/README.md b/README.md index 741d474..e72c77c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # zoo-layout +![](https://img.shields.io/npm/v/@zoo-js/layout?style=flat-square) + +Layout for zoo-js. ## install ``` @@ -9,30 +12,28 @@ yarn add @zoo-js/layout ``` ## use + ```javascript import { createApp } from 'vue' import Layout from '@zoo-js/layout' createApp().use(Layout) //jsx - const slots = { - header: () =>
header
, - default: () =>
main
+ header: () =>
header
, + default: () =>
main
} //template - - -``` \ No newline at end of file +``` diff --git a/package.json b/package.json index 5da099f..fd46f48 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,24 @@ { "name": "@zoo-js/layout", "version": "0.0.1", - "main": "lib/zoo-layout.umd.min.js", + "main": "./dist/zoo-layout.umd.min.js", + "files": [ + "dist" + ], "author": "zoo-js", "description": "zoo-layout", - "keyword": [ + "homepage": "https://github.com/zoo-js/zoo-layout", + "keywords": [ "zoo-js", "layout" ], "private": false, + "license": "MIT", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", - "lib": "vue-cli-service build --target lib --name zoo-layout --dest lib packages/index.js" + "dist": "vue-cli-service build --target lib --name zoo-layout packages/index.js", + "prepublishOnly": "npm run dist && np --yolo --no-publish" }, "repository": { "type": "git", @@ -30,6 +36,7 @@ "@vue/compiler-sfc": "^3.0.0", "babel-eslint": "^10.1.0", "compression-webpack-plugin": "^6.0.5", + "np": "^7.0.0", "sass": "1.29.0", "sass-loader": "10.1.0" }, diff --git a/packages/Layout/Layout.jsx b/packages/Layout/Layout.jsx index 3160347..21cadce 100644 --- a/packages/Layout/Layout.jsx +++ b/packages/Layout/Layout.jsx @@ -16,7 +16,6 @@ export default defineComponent({ }, setup(props, { slots }) { - console.log(props.title) const renderHeader = () => { return
diff --git a/vue.config.js b/vue.config.js index c1b2fbf..6872771 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,9 +1,13 @@ module.exports = { - pages: { - index: { - entry: 'examples/main.js', - template: 'public/index.html', - filename: 'index.html' - } + pages: { + index: { + entry: 'examples/main.js', + template: 'public/index.html', + filename: 'index.html' } + }, + productionSourceMap: false, + css: { + extract: false + }, } \ No newline at end of file