{"id":13519769,"url":"https://github.com/masylum/asereje","last_synced_at":"2025-07-12T06:33:03.189Z","repository":{"id":1607640,"uuid":"2204936","full_name":"masylum/asereje","owner":"masylum","description":"Forget about assets builds","archived":false,"fork":false,"pushed_at":"2011-12-08T17:16:42.000Z","size":111,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T09:35:16.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sixty-north/segpy","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masylum.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-14T10:23:25.000Z","updated_at":"2018-04-30T17:07:22.000Z","dependencies_parsed_at":"2022-08-25T17:01:26.428Z","dependency_job_id":null,"html_url":"https://github.com/masylum/asereje","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/masylum/asereje","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fasereje","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fasereje/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fasereje/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fasereje/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masylum","download_url":"https://codeload.github.com/masylum/asereje/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fasereje/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951610,"owners_count":23687974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:02:02.958Z","updated_at":"2025-07-12T06:33:02.796Z","avatar_url":"https://github.com/masylum.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"        .aMMMb  .dMMMb  dMMMMMP dMMMMb  dMMMMMP dMMMMMP dMMMMMP\n       dMP\"dMP dMP\" VP dMP     dMP.dMP dMP         dMP dMP\n      dMMMMMP  VMMMb  dMMMP   dMMMMK\" dMMMP       dMP dMMMP\n     dMP dMP dP .dMP dMP     dMP\"AMF dMP     dK .dMP dMP\n    dMP dMP  VMMMP\" dMMMMMP dMP dMP dMMMMMP  VMMMP\" dMMMMMP\n\n\n\"Aserejé ja de jé de jebe, tu de jebere sebiunouba, majabi an de bugui an de buididipí\"\n\n## Description\n\nAsereje is a library that builds your assets on demand.\n\n## Installation\n\n``` bash\nnpm install asereje\n```\n\n## Usage\n\nFirst you have to configure asereje:\n\n``` javascript\nvar asereje = require('asereje');\n\nasereje.config({\n  active: process.env.NODE_ENV === 'production'        // enable it just for production\n, js_globals: ['lib/jquery', 'global', 'underscore']   // js files that will be present always\n, css_globals: ['reset', 'global']                     // css files that will be present always\n, js_path: __dirname + '/public/javascripts'           // javascript folder path\n, css_path: __dirname + '/public/css'                  // css folder path\n});\n```\n\nThen you can use `css` or `js` function to get the file names.\n\n``` javascript\nres.render('users/index', {\n  css: asereje.css(['users', users/index]) // =\u003e ['reset', 'global', 'users', 'users/index']\n});\n\n// ... it builds the files and the next requests will return:\n\nres.render('users/index', {\n  css: asereje.css(['users', users/index]) // =\u003e ['dist/f330099956c144c090b06f6d4bae8770', 'dist/caa6925553b03e049eeda6f70da9dc1a']\n});\n```\n\n``` jade\nhtml\n  head\n    -each file in css\n      link(rel= 'stylesheet', href= '/css/' + file + '.css' )\n  ...\n```\n\n## Explanation\n\nAsereje does 3 things:\n\n  * Bundles your files together and build 2 files. The first is for the files that are common to all the pages, such a reset.css or jquery.js.\n    This files will be cached once and not requested anymore. The second file is specific to each page.\n  * Applies minification. `Ugilify-js` for javascripts and `sqwish` for css.\n  * Renames the files with the md5 of the content. This way we can set the expires header to max.\n\n## Configure your webserver to take advantage\n\nBuilt files are stored under `js_path|css_path/dist`. Add expires headers to all this files so the users will have them cached forever.\n\n```\n// nginx conf\nlocation ~* ^/(css|javascripts)/dist/.+\\.(css|js)$ {\n  expires max;\n}\n```\n\n## Asereje? What does it mean??\n\n[The true meaning of life](http://www.youtube.com/watch?v=drw-M-t4OTo)\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 Pau Ramon Revilla \u0026lt;masylum@gmail.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Fasereje","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasylum%2Fasereje","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Fasereje/lists"}