Skip to content

Commit

Permalink
v0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
coderosh committed Sep 23, 2020
1 parent a0a625d commit 7629d52
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.5.2

- globalInfo is exported from index file.
- Better name for functions

## v0.5.1

- Support relative images in markdown.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ulka",
"version": "0.5.1",
"version": "0.5.2",
"description": "Ulka - static site generator",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/fs/copy-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import generateFileName from "../utils/generate-file-name"

const configs = globalInfo.configs

const parseUrlPath = (css: string, f: string) => {
const changeCssUrlPath = (css: string, f: string) => {
return css.replace(/ url\((.*?)\)/gs, (...args) => {
const pathGiven = args[1].replace(/'|"/gs, "")

Expand Down Expand Up @@ -56,7 +56,7 @@ const copyAssets = async (
let readAssetsFile
if (f.ext === ".css") {
readAssetsFile = fs.readFileSync(path.format(f), "utf-8")
readAssetsFile = parseUrlPath(readAssetsFile, f.dir)
readAssetsFile = changeCssUrlPath(readAssetsFile, f.dir)
} else {
readAssetsFile = fs.readFileSync(path.format(f))
}
Expand Down
4 changes: 2 additions & 2 deletions src/fs/mkdir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from "fs"
import { isAbsolute } from "path"
import absolutePath from "../utils/absolute-path"

const createDirectories = async (pathname: string) => {
const mkdir = async (pathname: string) => {
if (!isAbsolute(pathname)) {
pathname = absolutePath(pathname)
}
Expand All @@ -12,4 +12,4 @@ const createDirectories = async (pathname: string) => {
})
}

export default createDirectories
export default mkdir
4 changes: 2 additions & 2 deletions src/fs/rmdir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from "fs"
import path from "path"
import absolutePath from "../utils/absolute-path"

const removeDirectories = (pathname: string) => {
const rmdir = (pathname: string) => {
rmdirSync(absolutePath(pathname))
}

Expand All @@ -24,4 +24,4 @@ function rmdirSync(pathname: string) {
}
}

export default removeDirectories
export default rmdir
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export {
UlkaPluginRehype,
UlkaPluginRemark
} from "./data/plugins"
export { default as globalInfo } from "./globalInfo"

0 comments on commit 7629d52

Please sign in to comment.