• Stars
    star
    778
  • Rank 58,431 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reverse engineering JavaScript and CSS sources from sourcemaps

shuji (周氏)

Reverse engineering JavaScript and CSS sources from sourcemaps

Build Status Windows build status Node.js v14 CI codecov FOSSA Status

Background for the name

The name of the project is for honouring the legacy of a certain master from the Ryukyu archipelago who contributed to the martial arts that we today know as karate and ryukyu kobujutsu.

Getting started

Install the shuji command line utility globally with npm. Elevated privileges might be needed via sudo, depending on the platform. In most cases just:

npm install --global shuji

Usage example:

shuji file.js.map -o folder

Please note that the minimum supported version of Node.js is 14.15.0, which is the active Long Term Support (LTS) version.

Command line options

The output of shuji --help pretty much covers all the options:

shuji - Reverse engineering JavaScript and CSS sources from sourcemaps
Usage: shuji [options] <file|directory>

  -h, --help               Help and usage instructions
  -o, --output-dir String  Output directory - default: .
  -p, --preserve           Preserve sourcemap's original folder structure.
  -M, --match String       Regular expression for matching and filtering files -
                           default: \.map$
  -v, --verbose            Verbose output, will print which file is currently being
                           processed
  -V, --version            Version number

Version 0.8.0

Testing

Test files are generated with UglifyJS 3 and sass by using files from the stretchy project, with the following commands:

uglifyjs stretchy.js --compress --mangle \
 --output stretchy.min.js --source-map includeSources
mv stretchy.min.js.map stretchy-with-sources.min.js.map

uglifyjs stretchy.js --compress --mangle \
 --output stretchy.min.js --source-map "url=inline"
mv stretchy.min.js stretchy-inline-sources.min.js

uglifyjs stretchy.js --compress --mangle \
 --output stretchy.min.js --source-map "url=stretchy.min.js.map"

sass stretchy.scss:stretchy.css

sass stretchy.scss:stretchy-inline.css --embed-source-map

Unit tests are written with tape and can be executed with npm test. Code coverage is inspected with nyc and can be executed with npm run coverage after running npm test. Please make sure it is over 90% at all times.

Contributing

"A Beginner's Guide to Open Source: The Best Advice for Making your First Contribution".

Also there is a blog post about "45 Github Issues Dos and Don’ts".

Linting is done with ESLint and can be executed with npm run lint. There should be no errors appearing after any JavaScript file changes.

Please note that any features or changed will not be merged without working unit tests.

Version history

Changes happening across different versions and upcoming changes are tracked in the CHANGELOG.md file.

License

Copyright (c) Juga Paazmaya [email protected]

Licensed under the MIT license.

FOSSA Status

More Repositories

1

yaml-validator

Validate Yaml files and enforce a given structure
JavaScript
49
star
2

modern-web-tools-with-node-js-book

Modern Web tools with Node.js - Course book
JavaScript
31
star
3

image-duplicate-remover

Remove duplicate images
JavaScript
21
star
4

creative-suite-to-qml

Scripts for exporting things from different Adobe Creative Suite programs to Nokia Qt Quick prototypes
JavaScript
12
star
5

sakugawa

CSS splitter, filter and organiser
CSS
10
star
6

PaazioTools

Tools, tests and exampled for few different purposes, mainly written in scripting languages
ActionScript
7
star
7

grunt-html2md

Transform HTML files to Markdown in a Grunt task
JavaScript
6
star
8

maezato

Clone all repositories of a given user at GitHub
JavaScript
3
star
9

grunt-trimtrailingspaces

Grunt task for trimming trailing spaces from each line of the selected files
JavaScript
3
star
10

grunt-hgactivity

Run Mercurial Activity extension to provide graphs for the given time spans
JavaScript
3
star
11

gulp-sakugawa

Run Sakugawa via gulp, for CSS splitting, filtering and organising
JavaScript
3
star
12

tozan

Index filesystem by creating metadata database
JavaScript
2
star
13

image-foldarizer

Take a flat directory of named image files that have some counter and place then in subdirectories
JavaScript
2
star
14

renshuu.paazmaya.fi

Training timetable and location planner
PHP
2
star
15

grunt-togeojson

Grunt task for converting KML and GPX files to GeoJSON and TopoJSON
JavaScript
2
star
16

tawata

Check that dependencies are limiting the package size
JavaScript
2
star
17

hello-node-js

Hello there Node.js World
JavaScript
1
star
18

hamahiga

Fetch images from Restful API
1
star
19

papervision3d

Automatically exported from code.google.com/p/papervision3d
HTML
1
star
20

arduino-playground

Arduino Playground
Arduino
1
star
21

grunt-yaml-validator

Validate Yaml files and enforce a given structure with Grunt
JavaScript
1
star
22

grunt-image-profile

A Grunt task for working with image metadata profiles via ImageMagick
JavaScript
1
star
23

Mobility-Information

Mobility Information via Qt Mobility packages for Nokia Symbian and MeeGo devices.
QML
1
star
24

shigehachi

Compare two sets of images
JavaScript
1
star
25

chatanyara.js

Collect Performance API data to a plain JavaScript Object
JavaScript
1
star
26

juoksevajohtaja.fi

Static web site for the "running leader" podcast
Nunjucks
1
star
27

swc-plugin-ignore-import

SWC plugin to ignore and remove certain imports based on configuration
JavaScript
1
star
28

image-flatify

Take a directory, search images recursively and rename as single flat directory with date based filenames
JavaScript
1
star
29

matsumura-rohai

Translate PO files with the help of Microsoft Translate API
JavaScript
1
star
30

grunt-sakugawa

Run Sakugawa via Grunt, for CSS splitting, filtering and organising
CSS
1
star
31

kanigawa

Electron based desktop application for setting geotags for images
TypeScript
1
star